Added some code files to support the use of 120Hz models and memory mode display.#122
Added some code files to support the use of 120Hz models and memory mode display.#122kaller-wu wants to merge 2 commits intoholodyne:mainfrom
Conversation
*The _slm_win_memory here is actually the original _slm_win(without modification, different from the one in slmsuite), in order to use this santec_memory, one needs to manually change the name of _slm_win_memory to _slm_win to load the correct file.
Slight change made to let 120Hz models function correctly. Sadly, there is no way to find out whether a model is 60Hz or 120Hz from its serial number.
ichristen
left a comment
There was a problem hiding this comment.
Thanks for your work on this!
As a first major comment: there needs to be a single unified santec.py. Code has to be maintained, and repeated code is a bane to a maintainer (if you want to change/debug one section, you have to track down all the copies!). There is a lot of repeated code between these three versions (original, 120Hz, memory), so it is better to have one combined file which has if else statements to handle differences. For instance:
- 120 Hz should be handled as a flag
is120hz=to the constructor__init__(). That way, the user can decide whether they want to initialize a 120 Hz SLM. (It would be nicer if it could autodetect, which is why I was asking about this in the different thread). - Memory mode should ideally be accessed as an option to the original class. After all, it is possible to use the hardware in DVI mode, then switch to memory mode, so it doesn't make sense to need to reconstruct the object.
I think the new headers you have added are supporting newer Santec .dlls? That's a separate issue from memory mode. It seems that the main change is there a few new functions, but everything else is the same? We will need to parse through the new functions and decide if we want to support them.
|
Hi Ian! For the memory mode thing, it can work with the original slm_win_ file, but the one in slmsuite is modified, I don't know if we can change it or something? For my own use, I can just replace it, but that's just a thing for temporary use, and of course not good for code continuity, maybe you can identify the changed parts in the slm_win file and find a way to make it compatible with the official one? Best |
|
Making a new backwards compatible slm_win_ is ideal (however is best, whether replacing with the new slm_win_ or merging). I will see if I can take a look at this (and also add a display name check) within a week. |
Added some code files to support the use of 120Hz models and memory mode display.
I tested the most basic display functions, think it's working fine, and there are lots more functions that santec slms support that haven't been used, but in slmsuite, I think only the most basic functions are needed. This is working fine for me in the wavefront_calibration example, and I think it's going to work fine in other examples also.
Hope this can be of help for you guys and this great project, and hope I didn't write my codes too slow and keep you waiting for too long.