Skip to content

Commit

Permalink
update imagespec
Browse files Browse the repository at this point in the history
  • Loading branch information
drhlxiao committed Aug 21, 2023
1 parent fba5c22 commit f1296af
Show file tree
Hide file tree
Showing 2 changed files with 1,427 additions and 222 deletions.
1,627 changes: 1,405 additions & 222 deletions examples/tutorial.ipynb

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions stixdcpy/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'FITS': f'{HOST}/api/query/fits',
'FLARE_AUX': f'{HOST}/api/request/auxiliary/flare',
'CFL_SOLVER': f'{HOST}/api/request/solve/cfl',
'CQLC': f'{HOST}/api/request/cqlc',
'CAVEATS': f'{HOST}/api/operations/caveats',
'SPECTROGRAMS': f'{HOST}/request/bsd/spectrograms'
}
Expand Down Expand Up @@ -590,6 +591,27 @@ def fetch_science_data(_id: int):
return Request.post(ENDPOINTS['SCIENCE_DATA'], {
'id': _id,
})
@staticmethod
def fetch_attenuation_corrected_light_curves(begin_utc, end_utc):
""" fetch corrected quick-look light curves attenuation by the Attenuator
Parameters:
------
begin_utc: str, datetime, pandas.Timestamp or astropy.time.Time
flare start UTC
end_utc: str, datetime, pandas.Timestamp or astropy.time.Time
flare end UTC
Returns:
-----
flare_list: dict or None
flare list if success or None if failed.
"""
begin_utc, end_utc=stu.anytime(begin_utc), stu.anytime(end_utc)
return Request.post(ENDPOINTS['CQLC'], {
'start': begin_utc,
'end': end_utc
})

@staticmethod
def fetch_flare_list(begin_utc, end_utc, sort: str = 'time'):
Expand Down

0 comments on commit f1296af

Please sign in to comment.