Added PWFS and CBlue interface - #59
Conversation
| sx = sx / flux_clamped | ||
| sy = sy / flux_clamped | ||
| else: | ||
| if total_intensity <= 0 or n_subap == 0: |
There was a problem hiding this comment.
Slopes form intentity option is missing, this could simply be something like:
sx = _np.concatenate([A,B]) * factor
sy = _np.concatenate([C,D]) * factor
The intentisy option should also relax the requiements on the pupils definition (i.e. they do not need to be of the same shape/size)
| self._logger.info(f"Setting frame rate to {fps} Hz") | ||
| self._cam.setParameter("fps", float(fps)) | ||
| self._fps = float(fps) | ||
|
|
| ] | ||
| mask = img1.astype(np.uint8) | ||
| ncoords = np.asarray(coords) | ||
| x0 = np.asarray([1000.0, 0.0, 1000.0, 1000.0]) |
There was a problem hiding this comment.
Why is the initial guess different for one of the pupils?
| out = np.zeros((4, h, w), dtype=np.float64) | ||
| for i, idx in enumerate(self.indpup): | ||
| out[i].ravel()[idx] = flat[idx] | ||
| return out |
There was a problem hiding this comment.
This is 450 lines of code for a relatively simple operation: are we sure that a copy-paste from specula (or importing the pyr_pupdata_calibrator) would not have been better?
There was a problem hiding this comment.
@Menessao Please, verify if this module can be simplified, so that it can be incorporated directly into the PyramidWFS class (take as example the IngotWFS).
There is no need to rewrite code.
There was a problem hiding this comment.
In general, we don't want "operation" files. Try to put this into the Pyramid class, or if the class gets to long, create a _API/pwfsAPI.py module
There was a problem hiding this comment.
We don't use extrernal software to use hardware (pysilico in this case).
Migrate it to it's core library
pietroferraiuolo
left a comment
There was a problem hiding this comment.
Address the comments in the files.
As for the CBlue camera, for use purposes it is ok to use pysilico for now, but this needs to get changed.
| def acquire_map( | ||
| self, | ||
| nframes: int = 1, | ||
| output_type: str = "slopes2d", |
There was a problem hiding this comment.
Make sure the default output_type matches what is needed, as example, for an IFF calibration.
This PR adds an interface to the CBlue camera (via Pysilico) and adds a Pyramid WFS class, similar to the existing Ingot one but with four pupils