Skip to content

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

}


}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

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