Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cheta/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ def __init__(self, msid, start=LAUNCH_DATE, stop=None, filter_bad=False, stat=No
self.datestart = DateTime(self.tstart).date
self.datestop = DateTime(self.tstop).date
self.data_source = {}
self.content = content.get(self.MSID)

if self.datestart < DATE2000_LO and self.datestop > DATE2000_HI:
intervals = [(self.datestart, DATE2000_HI), (DATE2000_HI, self.datestop)]
Expand All @@ -529,6 +528,10 @@ def __init__(self, msid, start=LAUNCH_DATE, stop=None, filter_bad=False, stat=No
if "CHETA_FETCH_DATA_GAP" in os.environ:
create_msid_data_gap(self, os.environ["CHETA_FETCH_DATA_GAP"])

@property
def content(self) -> str | None:
return content.get(self.MSID) if "cxc" in data_source.sources() else None
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to me, but do we also want to define the content for the stk computed msids? Otherwise we end up trying to do the remote access query again if the user wants a content for the Msid:

In [9]: ephem = fetch.Msid("orbitephem_stk_x", "2025:001", "2025:002")

In [10]: ephem.content
Enter hostname (or IP) of Ska server (enter to cancel):

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no real reason that a user would try getting ephem.content since it is not defined. So probably this would be fixing a problem that does not happen in practice.


def __len__(self):
return len(self.vals)

Expand Down