Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duration typo the cpd data container #132

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
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
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
Loading