Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/ion kit 1.0.0 #6

Merged
merged 18 commits into from
Jan 19, 2024

Conversation

Fixstars-momoko
Copy link
Contributor

Update tutorial code for ion-kit 1.0.0

C++

  • tutorial 1 : API, parameters, got rid of optional input (Gain and ExposureTime)

Python

  • tutorial 1 : API, parameters, got rid of optional input (Gain and ExposureTime)
  • tutorial 1 came2 : API, parameters, got rid of optional input (Gain and ExposureTime)

Note: Python binding issues are still under fixing at (fixstars/ion-kit#206 and fixstars/ion-kit#205)

Added tutorial code for ion-kit 1.0.0

C++

  • tutorial 2 : enable to control Gain and ExposureTime

Python

  • tutorial 2 : enable to control Gain and ExposureTime

@@ -133,7 +98,6 @@ int main(int argc, char *argv[])
int ret = video<uint16_t>(width, height, pixelformat, num_device);
}


}catch(std::exception& e){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should catch ion::Error additionally to std::exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 87d09cf

// JIT compilation and execution of pipelines with Builder.
try {
b.run(pm);
b.run();
}catch(std::exception& e){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can delete try-catch from here and delegate to outermost try-catch block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in a85a0a5

# running the builder
builder.run(port_map)
builder.run()
output_bytes = outputs[0].read(output_byte_size)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read is no longer needed. You can create ion.Buffer passing numpy array (Buffer(array=numpy_array)) and you can access data through numpy array without ion.Buffer.read/write operation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 24b9ed0

port_map.set_buffer(gain_p, gains)
port_map.set_buffer(exposuretime_p, exposures)
port_map.set_buffer_array(output_p, outputs)
output_p[0].bind(outputs[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after pull fixstars/ion-kit#207
you can use output_p.bind(outputs)

@xinyuli1204 xinyuli1204 merged commit 8eff62d into Sensing-Dev:main Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants