-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create WCS Header and Apply Distortion Correction to L3 #299
Conversation
… any wcs information in the extension header anymore
merge astrom_e2e into astrom_b2
corgidrp/astrom.py
Outdated
|
||
def boresight_calibration(input_dataset, field_path='JWST_CALFIELD2020.csv', field_matches=None, find_threshold=10, fwhm=7, mask_rad=1, | ||
comparison_threshold=50, search_rad=0.0075, platescale_guess=21.8, platescale_tol=0.1, center_radius=0.9, | ||
frames_to_combine=None, find_distortion=False, fitorder=3, position_error=None, initial_dist_guess=None): | ||
""" | ||
Perform the boresight calibration of a dataset. | ||
|
||
Args: | ||
input_dataset (corgidrp.data.Dataset): Dataset containing a images for astrometric calibration | ||
field_path (str): Full path to file with search field data (ra, dec, vmag, etc.) (default: 'JWST_CALFIELD2020.csv') |
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.
Is it safe to have this as a missable keyword argument set by default to 'JWST_CALFIELD2020.csv', or would it be better just to have it be another required argument?
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.
this file is packaged into corgidrp, so the default should always work.
tests/e2e_tests/astrom_e2e.py
Outdated
@@ -178,7 +177,7 @@ def test_astrom_e2e(tvacdata_path, e2eoutput_path): | |||
assert dec == pytest.approx(target[1], abs=8.333e-7) | |||
|
|||
if __name__ == "__main__": | |||
tvacdata_dir = "/Users/macuser/Roman/corgi_contributions/Callibration_Notebooks/TVAC" | |||
tvacdata_dir = "/Users/macuser/Roman/corgidrp_develop/calibration_notebooks/TVAC" |
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.
Is there a standardized solution for what filepath to use for the data in the end-to-end tests so that it can be run on any machine?
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.
this is used only for debugging. the way the e2e tests are run (see README), don't use these lines of code.
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. very minor comments. There's some merge conflicts with main, but you can merge into astrom_e2e if that's easier (I changed it to merge into astrom_e2e because it made review easier).
@@ -1056,9 +1056,12 @@ def create_astrom_data(field_path, filedir=None, image_shape=(1024, 1024), subfi | |||
prihdr['VISTYPE'] = 'BORESITE' | |||
prihdr['RA'] = target[0] | |||
prihdr['DEC'] = target[1] | |||
prihdr['ROLL'] = 0 ## assume a telescope roll = 0 for now |
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.
Note that this will be covered by this upcoming PR: https://github.com/roman-corgi/corgidrp/pull/306/files#diff-02971e9165951439a9a69d418600747c90eb4612e412cd077fdab3655c0343eaR150. No action now, but we can remove it in the future.
Describe your changes
Functionality and unit tests for creating the wcs header information (l2b_to_l3) and applying distortion solution to the dataset (l3_to_l4).
Type of change
Please delete options that are not relevant (and this line).
Reference any relevant issues (don't forget the #)
#234
#5
Checklist before requesting a review