-
Notifications
You must be signed in to change notification settings - Fork 3
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
BSMEM prior image #10
Comments
The prior image should be stored in an hdu identified in RGL_PRIO keyword |
There exists an Could be re-enabled by setting it as "supported standard keywords" in The Combo box could use the same It seems that the Hdus in a |
Actually RGL_PRIO is defined as a standard keyword, but explicitely disabled by BsmemInputParam.supportsStandardKeyword(). However this String keyword is special as it should be handled in the GUI as an Image Selector (+/- load image buttons) and display a list of candidate images (same list as INIT_IMG), so this keyword should be handled (hard-coded) in SoftwareSettingsPanel in particular, but this behaviour could be replicated for specific software keywords (like WISARD to give a support image). |
branch https://github.com/buthanoid/oimaging/tree/bsmem-rgl-prio I had to modify the function |
For the rest I did not mimic exactly the input image way, for example I used a FitsImageHDU value to represent the "[No Image]" item choice, instead of mixing String with FitsImageHDU in the same list.
in both scenarios IRModel has to not include an rgl prio hdu in the oifitsfile. |
Still some work to do :
|
@gmella Any idea why setSelectedInputImageHDU() needed to check if the given hdu was present in the current list of imageHDUs (checksum...), = consistency check ? |
I would prefer having the same approach to handle Null images in all cases (INIT_IMG, RGL_PRIO). Finally I had a look at your fork branch : code looks good, not tested. |
This was probably done to avoid stacking of duplicated images. The basic associated use case is to run a process with the same input params. A result also can be the same for small input changes and this would not add the output image because the GUI already has it. |
TODO: test case INIT_IMG = RGL_PRIO (avoid duplicates) |
Sorry I integrated too quickly the PR, let's fix the bug later:
|
Beta release: http://jmmc.fr/~betaswmgr/OImaging/ |
I think in OR, we just give systematic different HDU names like a one letter prefix I for InputImg and R for RglPrio. |
I do not see why oitools should manage such OImaging logic that is caused by
If selectedInputImageHDU == selectedRglPrioImage: do not add selectedRglPrioImage ? or check HDU_NAME values too ? |
I did it, it works fine for the input file (only the primary HDU contains an image when both init and rgl are same).
Of course this is a BSMEM problem since it happens also when the input files have duplicate hdus. |
I propose to adopt another approach:
|
Problem is the two hdus are the same object. If I rename one HDU I rename both. |
I think it is best if OImaging try to respect the spec. If BSMEM creates duplicates HDU, as long as OImaging is able to read them correctly, then it is a BSMEM problem |
I am OK to fix OImaging GUI (no duplicated HDU) now and fix BSMEM later (in our JMMC-OpenDev repo) |
With the new FitsImageHDU copy constructor, it is time to fix this issue:
|
I have tested BSMEM with OImaging, for both RGL_PRIO = INIT_IMG and RGL_PRIO != INIT_IMG. In both cases BSMEM writes two image HDUs to the output FITS (in positions 2 and 3), for INIT_IMG and RGL_PRIO respectively. This mirrors how OImaging writes the input file, where there are always separate image HDUs for INIT_IMG (the primary HDU) and RGL_PRIO (the penultimate HDU). What is the desired behaviour for BSMEM? Do you want only one image in the output file when RGL_PRIO = INIT_IMG? This should probably be clarified in the interface document. BTW, it would be helpful if OImaging would write the name of the image to the EXTNAME keyword as well as HDUNAME (except for the primary HDU where EXTNAME is not allowed by the FITS standard). |
BSMEM prior image is missing (see bug trac #811 )
By default it uses the init image as prior but we should provide at least a Gaussian prior parametrized by the FWHM.
Whether it can be easily done in command line (using the flag -mw), I'm not sur it is possible through the OImage format.
The text was updated successfully, but these errors were encountered: