-
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
Write co-registration settings to JSON param file #60
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Okay, this is a good start.
I think we should standardize the coreg file naming, and not give the user the option to modify it. In addition, lets completely remove the coreg setting defaults from settings.py. If there's no coreg file detected, the fucntions that rely on one should give the user an error message and direct them to run the notebook. The defaults are not going to transfer across instruments, so I think it makes more sense to force the user to run it once on each instrument.
If we have a structured name scheme (i.e. coreg_params_yymmdd), then we can search for the files in the expected places.
The alternative is to append successive coreg updates to the same file (coreg_params.json) with some text in the JSON about when they were added. Whichever you prefer.
@ngreenwald I think it's easier to write successive coreg updates to the same file. We'll store each different co-registration parameter set in list format such as:
In this way, we have one JSON file (as opposed to multiple that would create more clutter in This will allow us to remove the |
…ate_coregistration_params.ipynb first
Per our meeting, the following have been updated:
|
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.
Looks good, just a typo
What is the purpose of this PR?
Closes #54. Currently, after running
update_coregistration_params.ipynb
, the new conversion factors are appended directly tosettings.py
. This causes a lot of clutter and causessettings.py
to diverge frommain
. We should write the params to untracked temp.json
file instead.How did you implement your changes
The following changes have been added:
write_coreg_params
has been nuked: instead we save to a file calledstage_optical_coreg_params.json
intoffy
directly inupdate_coregistration_params.ipynb
.convert_stage_to_optical
now includes a a default argumentstage_optical_coreg_path
set tostage_optical_coreg_params.json
. If this path exists, then we read the coregistration conversion factors directly from the created.json
file. Otherwise, we use the default factors insettings.py
.