Skip to content
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

Make cutouts out of TICA cubes #60

Merged
merged 66 commits into from
Nov 1, 2022
Merged

Make cutouts out of TICA cubes #60

merged 66 commits into from
Nov 1, 2022

Conversation

jaymedina
Copy link
Collaborator

@jaymedina jaymedina commented Apr 25, 2022

Implements a class based off the existing CutoutFactory class that can generate TPFs out of TICA cubes.

Note: This is one of the core four projects for MAST Q3 and must be implemented before June.

  • Implement TICACutoutFactory
  • Verify file structural similarity between TICA and TESS TPFs
  • Verify image similarity between TICA and TESS TPFs
  • Ensure TPF header keywords should be the same between TICA and TESS
  • Ensure TICA header keyword values are unique from TESS and accurate
  • Add new header keyword in TPF that lets users know what FFIs were used to make the TPF (TICA or TESS?)
  • Unit test(s)

@jaymedina jaymedina changed the title initializing TicaCutoutFactory Make cutouts out of TICA cubes Apr 25, 2022
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Base: 94.85% // Head: 93.78% // Decreases project coverage by -1.07% ⚠️

Coverage data is based on head (4d11e4d) compared to base (c71b055).
Patch coverage: 90.51% of modified lines in pull request are covered.

❗ Current head 4d11e4d differs from pull request most recent head 1275009. Consider uploading reports for the commit 1275009 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
- Coverage   94.85%   93.78%   -1.08%     
==========================================
  Files           8        8              
  Lines        1107     1415     +308     
==========================================
+ Hits         1050     1327     +277     
- Misses         57       88      +31     
Impacted Files Coverage Δ
astrocut/make_cube.py 92.38% <89.01%> (-5.20%) ⬇️
astrocut/cube_cut.py 98.64% <95.77%> (-0.73%) ⬇️
astrocut/__init__.py 91.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jaymedina
Copy link
Collaborator Author

Note:
TPF header keywords should be the same between TICA and TESS:
Add new header keyword in TPF that lets users know what FFIs were used to make the TPF (TICA or TESS?)
Add new header keyword showing version of astrocut used to make TPF

@jaymedina jaymedina marked this pull request as draft May 4, 2022 17:34
@jaymedina jaymedina marked this pull request as ready for review August 5, 2022 00:13
@jaymedina
Copy link
Collaborator Author

Tests will continue to fail until PR #59 gets merged and this branch gets updated with those changes.

@jaymedina jaymedina marked this pull request as draft September 6, 2022 15:44
@jaymedina jaymedina marked this pull request as ready for review October 19, 2022 16:51
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
@jaymedina
Copy link
Collaborator Author

tica-make-cutouts is done and ready for final approval.

@@ -84,27 +89,34 @@ def __init__(self):
"VIGNAPP": [None, "vignetting or collimator correction applied"]}


def _parse_table_info(self, table_data, verbose=False):
def _parse_table_info(self, product, table_data, verbose=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do use this function in tesscut. perhaps we shouldn't be, since it's "internal". or perhaps it should not be an internal function. nevertheless, it's fine as you have it, but it might have been nice to have had product be a keyword argument that defaulted to SPOC instead of being a positional arg so that downstream code wouldn't have to change. I believe you are also taking care of the downstream code, at least in tesscut. Are there any other packages that might use this function? Astroquery?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm fine with not changing this now. just pointing it out that we need to change it in tesscut (also in the s3_support branch, when we switch over to using this)

Copy link
Collaborator Author

@jaymedina jaymedina Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of changing this here to prevent any future bugs elsewhere. I'll work on this next.

EDIT: After second thought, it might be better to leave product as a required positional argument. We would still have to remember to change product to the Enum call wherever this function is on TESSCut, because we can't have SPOC as the default for both SPOC and TICA. And a "missing positional keyword argument" error is more straightforward to fix than whatever error would come out of attempting to parse SPOC info in a TICA table (it would probably be a missing keyword error, but still).

And no _parse_table_info doesn't seem to be explicitly used in astroquery

astrocut/cube_cut.py Outdated Show resolved Hide resolved
Copy link
Member

@falkben falkben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, i think just a few small things here and we are ready!

astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/cube_cut.py Outdated Show resolved Hide resolved
astrocut/tests/test_cube_cut.py Outdated Show resolved Hide resolved
falkben
falkben previously approved these changes Oct 28, 2022
@jaymedina jaymedina merged commit 141a643 into main Nov 1, 2022
@jaymedina jaymedina deleted the tica-make-cutouts branch November 1, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants