-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix radio buttons with e.g. o001 #996
Fix radio buttons with e.g. o001 #996
Conversation
Hello @bhilbert4, Thank you for updating !
Comment last updated at 2022-08-17 16:32:18 UTC |
|
Tested on the test server and it seems to be working. The radio button for crf files now includes the name of the association (e.g. 'o001_crf'). This is because crf filenames have an extra string when you break up a filename between underscores. I also found and fixed the bug that was causing the slider bar under the image to always list the image as '1/NaN' integrations. There was a typo in the directory being searched for jpgs. I also tweaked the code a bit so that the value now used in place of the NaN is the the total number of integrations in the file, rather than the number of integrations for which we have created preview images. These numbers are only different for exposures that have more than 100 integrations, which means only TSO observations I think. But using the true number of integrations is much less confusing than the number of jpg files, since for observations with more than 100 integrations we start making preview image for every 100th integration, in order to save disk space. I also tested this on the test server and it looks good.
|
I just checked the Jupiter observations from commissioning and there are no crfints files in the filesystem. So maybe we assume this fix is ok for those too and fix it if we find a problem in the future? If you agree @mfixstsci then this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@bhilbert4 I went reviewed and fixed conflicts. Anything else before merging? |
@mfixstsci I think it's ready to go! |
Resolves #990
This PR fixes the bug that was causing entries such as o001 to show up in the list of filename suffixes in the radio buttons for an individual file.
Previously, the suffix of the file was being found by assuming that it was the 4th section of the filename (separated by '_'). This doesn't work for crf files because they have an extra section that lists the association value, immediately before the 'crf' suffix. By using the filename parser, this should now work correctly for all file types.