Skip to content

Commit

Permalink
Fix bug where the download function crashes if no light curves exist …
Browse files Browse the repository at this point in the history
…in a chunk
  • Loading branch information
golmschenk committed Apr 29, 2024
1 parent 07ac1a4 commit dc8b3d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ramjet/data_interface/tess_data_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ def download_spoc_light_curves_for_tic_ids_chunk(
light_curve_observations[ColumnName.SECTOR] = light_curve_observations["obs_id"].map(get_sector_from_spoc_obs_id)
if sectors is not None:
light_curve_observations = light_curve_observations[light_curve_observations[ColumnName.SECTOR].isin(sectors)]
if light_curve_observations.shape[0] == 0:
return []
data_product_list = get_product_list(light_curve_observations)
light_curve_data_products = data_product_list[data_product_list["productFilename"].str.endswith("lc.fits")]
if limit is not None:
Expand Down

0 comments on commit dc8b3d7

Please sign in to comment.