Skip to content

Bug fixes#43

Merged
altuson merged 8 commits intomainfrom
bug_fixes
Mar 25, 2026
Merged

Bug fixes#43
altuson merged 8 commits intomainfrom
bug_fixes

Conversation

@altuson
Copy link
Copy Markdown
Owner

@altuson altuson commented Mar 24, 2026

This PR fixes minor bugs identified whilst creating the TESS asteroids HLSP database. Changes include:

  • Updated definition of VMAG and HMAG in _make_primary_hdu(). In a few rare cases, the computed value of VMAG and HMAG was nan, meaning the code would error because a nan cannot be saved in a FITS header. This has been fixed by catching nans and setting to None.
  • Updated treatment of sector 3 non-science data. Previously, we added this data to the SPOC quality mask. Now, we define our own LC quality flag in _create_lc_quality() to identify these cadences.
  • Add a catch in create_lc_quality_mask() if quality arrays are empty (can happen very rarely for PSF photometry if all data is flagged as bad quality).
  • Add a check in plot_lc() to only plot data if lightcurve is not empty (can happen very rarely for PSF photometry if all data is flagged as bad quality).
  • Fixed bug in _data_chunks() which was incorrectly returning a warning for sector 97 and 98.
  • Bumped patch version number.
  • Updated tests and tutorials.

@altuson altuson requested a review from jorgemarpa March 24, 2026 19:26
Copy link
Copy Markdown
Collaborator

@jorgemarpa jorgemarpa left a comment

Choose a reason for hiding this comment

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

this looks good to me

@altuson altuson merged commit 6d5d29e into main Mar 25, 2026
4 checks passed
@altuson altuson deleted the bug_fixes branch March 25, 2026 14:08
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.

2 participants