-
Notifications
You must be signed in to change notification settings - Fork 6
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
Software shouldn't change their inputs #12
Comments
Could you be more precise as to what is required? BSMEM doesn't intentionally change any of the input tables, but it reads their contents into memory and writes out new tables containing the information it read in. Hence there may be changes such as removal of keywords that BSMEM isn't expecting. The order of the tables is changed, but I would hope that OImaging is robust to that. |
Yes, I forgot this case. Changing the order of keywords and table values is ok as it does not change the information content. |
The software should add an extra column with the modeled values to the OI_VIS2, OI_VIS, |
@FerreolS By "not used" do you mean excluded by |
My concern was about WISARD, that need T3 and VIS2 at the same timestamp. If for some reason there is no corresponding VIS2, the T3 will not be used . It's value should stay in the table but must be flagged somehow. Am I right @GillesDuvert ? |
There is a potential edge case that could apply to BSMEM. It concerns the UVMAX parameter, which isn't implemented in OImaging yet. This tells BSMEM to filter the input data at the specified UV radius. At the moment, BSMEM applies a UV radius filter in two situations: (a) if UVMAX is specified and is smaller than the maximum UV radius in the data; (b) if the initial image pixel size is larger than \lambda_min / (6 B_max). At the moment if case (b) applies the corresponding UVMAX value is written to the input parameters HDU of the output file, potentially overwriting the original UVMAX specified by the user. I'm not sure of the best solution here - suggestions welcome! |
Hi I have mixed feelings about #12 (comment) above. |
But, back to the issue title, the main motive is to have the whole input image + input image header unchanged, yes? |
done. |
This case raise two concerns for me:
|
BTW it seems that on this particular UVMAX issue, the message
|
Indeed that is a bug. I was hoping we could agree on the correct way of handling UVMAX before I fix it. |
MiRA does raise an error or at least a warning if the input parameters are wrong (including the choice of the pixel size). The specified input parametes should not be modified by MiRA. Sometimes the error is not straightforward to interpret e.g. a pixel size larger than the field of view yields in an error because MiRA cannot create a 0x0 pixel image (this can be improved but being smart with all possible errors may be endless...). I can replace warnings such as:
by an error if this seems preferable in spite that some people like to override given advices ;-) |
I will add in the document that INPUT PARAM table (and INIT_IMG image) must remained unchanged. If for some reason (like the UVMAX case) the actual keyword used by the software differ, this actual value must be written int the OUTPUT PARAM table. Is it ok for you? If needed OImaging can easily track this change. |
To avoid too many specific rules, why not just have all input parameters copied into the out parameters with their actual (unchanged or not) values? |
As you wish, but on my opinion it will make change detection harder for human readers (there is still some people that read keyword). For OImaging it is not an issue I guess |
adding the point software should not alter or destroy other HDUs, blindly copying them in the output file from #15 (comment) that is much more related to this issue |
Yes this is ok. See https://gitlab.com/jsy1001/bsmem/-/issues/10 |
The benefit of not modifying the input parameters is traceability. Using OImaging or not, it allows you to remember what you gave to the software to build the output file you are reading. Concerning tracing if the software modified the input parameters or not, OImaging can do it as long as the new value of the parameter is somewhere in the output file. Of course, if both old and new values are in the output file, it is easier for OImaging. The current spec already ask the softwares to copy the input parameters table in the output file. However, it also ask the software to complete it with missing keywords that the software needs. I reckon that sometimes the input image is modified. My (current) point of view is that is is more simple if the software modifies the input parameters:
In any case, the user must be correctly informed when a parameter has been changed. He must not believe that the software used exactly what he gave as input. |
@buthanoid So are you proposing that when the reconstruction software modifies an explicit input parameter, both the input and used values should go in the input parameters table? If so, how do we store both values? I was thinking of appending something to the parameter name (e.g. keywords [param] and [param]-OLD), but we will run into the 8 character limit for keywords (unless we use the hierarchical keyword convention). |
Not exactly, I was proposing that the software should only store the value it actually used. So old values are lost. With a bit of work OImaging could retrieve them. |
At the moment bsmem does not follow this suggestion. The behaviour is documented in docs/common_interface.md, which reads:
This means that using the output as input to another reconstruction will only work as expected if the data selection parameters (TARGET, USE_*, UV_MAX) are unchanged. Changing bsmem to write all of the input data (whether selected or not) and model values would involve a fair amount of work. What do the other algorithms do? |
This issue was also discussed in #5 :
|
To prevent any surprise and to simplify the tracking by OImaging, the software should update only the OUTPUT PARAM table. It can add new HDU image if needed but shouldn't change the HDUs presents in the input file.
The text was updated successfully, but these errors were encountered: