Skip to content

Commit

Permalink
Fix duration typo the cpd data container (#132)
Browse files Browse the repository at this point in the history
* Fix typo
* Add change log

---------

Co-authored-by: Shane Maloney <[email protected]>
  • Loading branch information
hayesla and samaloney authored Jul 9, 2024
1 parent ba0ef1c commit 1b41df0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog/132.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix typo in `~stixpy.product.sources.science.ScienceData` 'durtaion' -> 'duration'.
4 changes: 2 additions & 2 deletions stixpy/calibration/visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def create_meta_pixels(
e_ind = np.argwhere(e_mask).ravel()

time_range = TimeRange(
pixel_data.times[t_ind[0]] - pixel_data.durtaion[t_ind[0]] / 2,
pixel_data.times[t_ind[-1]] + pixel_data.durtaion[t_ind[-1]] / 2,
pixel_data.times[t_ind[0]] - pixel_data.duration[t_ind[0]] / 2,
pixel_data.times[t_ind[-1]] + pixel_data.duration[t_ind[-1]] / 2,
)

changed = []
Expand Down
2 changes: 1 addition & 1 deletion stixpy/product/sources/science.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def times(self):
return self.data["time"]

@property
def durtaion(self):
def duration(self):
"""
An `astropy.units.Quantiy` array giving the duration or integration time
"""
Expand Down
4 changes: 1 addition & 3 deletions stixpy/product/sources/tests/test_quicklook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

@pytest.mark.remote_data
def test_qlflareflag():
ff = Product(
"https://pub099.cs.technik.fhnw.ch/fits/L1/2024/06/03/QL/" "solo_L1_stix-ql-flareflag_20240603_V02U.fits"
)
ff = Product("https://pub099.cs.technik.fhnw.ch/fits/L1/2024/06/03/QL/solo_L1_stix-ql-flareflag_20240603_V02.fits")
assert isinstance(ff, QLFlareFlag)
assert isinstance(ff.flare_location, SkyCoord)
assert ff.flare_location[0].transform_to(frame="helioprojective").frame.name == "helioprojective"
Expand Down

0 comments on commit 1b41df0

Please sign in to comment.