Skip to content

Commit

Permalink
Use execTime for fido search (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair authored Feb 19, 2024
1 parent 7c3c2b4 commit 62039c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions changelog/326.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use a new feature in the DKIST datasets API to search for all datasets which intersect the given time.
4 changes: 2 additions & 2 deletions dkist/net/attr_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def iterate_over_and(wlk, tree, params):
# SunPy Attrs
@walker.add_applier(Time)
def _(wlk, attr, params):
return params.update({'startTimeMin': attr.start.isot,
'endTimeMax': attr.end.isot})
return params.update({'execTimeMin': attr.start.isot,
'execTimeMax': attr.end.isot})


@walker.add_applier(Instrument)
Expand Down
2 changes: 1 addition & 1 deletion dkist/net/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def api_param_names():
Excludes ones with input dependant query params
"""
return {
a.Time: ('startTimeMin', 'endTimeMax'),
a.Time: ('execTimeMin', 'execTimeMax'),
a.Instrument: ('instrumentNames',),
a.Wavelength: ('wavelengthRanges',),
a.Physobs: ('hasAllStokes',),
Expand Down
12 changes: 6 additions & 6 deletions dkist/net/tests/test_attr_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def test_and_simple(query_and_simple):
assert out == [
{
"instrumentNames": "VBI",
"startTimeMin": "2020-06-01T00:00:00.000",
"endTimeMax": "2020-06-02T00:00:00.000",
"execTimeMin": "2020-06-01T00:00:00.000",
"execTimeMax": "2020-06-02T00:00:00.000",
}
]

Expand All @@ -181,12 +181,12 @@ def test_or_instrument(query_or_instrument):
assert out == [
{
"instrumentNames": "VBI",
"startTimeMin": "2020-06-01T00:00:00.000",
"endTimeMax": "2020-06-02T00:00:00.000",
"execTimeMin": "2020-06-01T00:00:00.000",
"execTimeMax": "2020-06-02T00:00:00.000",
},
{
"instrumentNames": "VISP",
"startTimeMin": "2020-06-01T00:00:00.000",
"endTimeMax": "2020-06-02T00:00:00.000",
"execTimeMin": "2020-06-01T00:00:00.000",
"execTimeMax": "2020-06-02T00:00:00.000",
}
]

0 comments on commit 62039c2

Please sign in to comment.