Skip to content

Commit

Permalink
Rename mjd to hjd for consistency with light curve collection
Browse files Browse the repository at this point in the history
  • Loading branch information
bfhealy committed Nov 3, 2023
1 parent 7b90415 commit f50ecba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions config.defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ kowalski:
classifications: ZTF_source_classifications_DR16
# Current alerts (on kowalski)
alerts: ZTF_alerts
# If cutting off queried light curves at a given data release, enter the max MJD (JD - 2400000.5) below
max_timestamp_mjd:
# If cutting off light curve at a given data release, enter the max HJD below
# (JD - 2400000.5 corrected for Earth/Sun light travel time)
max_timestamp_hjd:
fritz:
token:
protocol: https
Expand Down
6 changes: 3 additions & 3 deletions scope/fritz.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def get_lightcurves_via_ids(
get_basic_data=False,
):

cutoff_mjd = config['kowalski']['max_timestamp_mjd']
cutoff_hjd = config['kowalski']['max_timestamp_hjd']

itr = 0
lcs = []
Expand Down Expand Up @@ -190,8 +190,8 @@ def get_lightcurves_via_ids(
Nqueries = int(np.ceil(Nsources / limit_per_query))

time_filter = {"$gt": 0.0}
if cutoff_mjd is not None:
time_filter["$lte"] = 2400000.5 + cutoff_mjd
if cutoff_hjd is not None:
time_filter["$lte"] = 2400000.5 + cutoff_hjd

queries = [
{
Expand Down

0 comments on commit f50ecba

Please sign in to comment.