Skip to content

Commit 31d45c8

Browse files
author
David Turner
committed
Explicitly added erass_sky and erass_det units to the utils.py
Signed-off-by: David Turner <djturner@umbc.edu>
1 parent 3b6f605 commit 31d45c8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

xga/utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This code is part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
2-
# Last modified by David J Turner (djturner@umbc.edu) 5/5/26, 11:28 PM. Copyright (c) The Contributors.
2+
# Last modified by David J Turner (djturner@umbc.edu) 5/6/26, 9:25 AM. Copyright (c) The Contributors.
33

44
import importlib
55
import json
@@ -1074,14 +1074,17 @@ def check_telescope_choices(telescope: Union[str, List[str]]) -> List[str]:
10741074
erosita_sky = def_unit("erosita_sky")
10751075
erosita_det = def_unit("erosita_det")
10761076
#
1077+
erass_sky = def_unit("erass_sky")
1078+
erass_det = def_unit("erass_det")
1079+
#
10771080
chandra_sky = def_unit("chandra_sky")
10781081
chandra_det = def_unit("chandra_det")
10791082

10801083
# Define a dictionary to store the units in to make dynamic access easier. Also
10811084
# allows us to test if we forgot to define a unit when adding a new mission.
10821085
MISSION_XY_UNITS = {'xmm': {'skyxy': xmm_sky, 'detxy': xmm_det},
10831086
'erosita': {'skyxy': erosita_sky, 'detxy': erosita_det},
1084-
'erass': {'skyxy': erosita_sky, 'detxy': erosita_det},
1087+
'erass': {'skyxy': erass_sky, 'detxy': erass_det},
10851088
'chandra': {'skyxy': chandra_sky, 'detxy': chandra_det}
10861089
}
10871090

@@ -1099,7 +1102,8 @@ def check_telescope_choices(telescope: Union[str, List[str]]) -> List[str]:
10991102
except ValueError:
11001103
# Adding the unit instances we created to the astropy pool of units - means we can do things like just defining
11011104
# Quantity(10000, 'xmm_det') rather than importing xmm_det from utils and using it that way
1102-
add_enabled_units([r200, r500, r2500, xmm_sky, xmm_det, erosita_sky, erosita_det, chandra_sky, chandra_det,
1105+
add_enabled_units([r200, r500, r2500, xmm_sky, xmm_det, erosita_sky, erosita_det,
1106+
erass_sky, erass_det, chandra_sky, chandra_det,
11031107
SKY_XY_UNIT, DET_XY_UNIT])
11041108

11051109
# We add the equivalencies for some of the custom units we defined

0 commit comments

Comments
 (0)