Skip to content
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
18 changes: 7 additions & 11 deletions response_tools/detector_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ def cdte_det_resp(cdte:int=None, region:int=None, pitch=None, side:str="merged",

event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

file : `str`
Expand Down Expand Up @@ -143,15 +144,10 @@ def cdte_det_resp(cdte:int=None, region:int=None, pitch=None, side:str="merged",
logging.warning(f"In {sys._getframe().f_code.co_name}, the `side` must be in [\"pt\", \"merged\"].")
return

if event_type not in ["1hit", "2hit", "all", "mix"]:
logging.warning(f"In {sys._getframe().f_code.co_name}, the `event_type` must be in [\"1hit\", \"2hit\", (\"all\", \"mix\")].")
if event_type not in ["1hit", "2hit", "all"]:
logging.warning(f"In {sys._getframe().f_code.co_name}, the `event_type` must be in [\"1hit\", \"2hit\", \"all\"].")
return

if side=="merged" and event_type=="mix":
event_type="all"
elif side in ["pt"] and event_type=="all":
event_type="mix"

region = pitch2region[pitch] if have_pitch else region

_f = os.path.join(FILE_PATH,
Expand Down
36 changes: 20 additions & 16 deletions response_tools/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,11 @@ def foxsi4_telescope2_rmf(region:int=None, pitch=None, _side:str="merged", _even

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -664,10 +665,11 @@ def foxsi4_telescope3_rmf(region:int=None, pitch=None, _side:str="merged", _even

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -832,10 +834,11 @@ def foxsi4_telescope4_rmf(region:int=None, pitch=None, _side:str="merged", _even

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -998,10 +1001,11 @@ def foxsi4_telescope5_rmf(region:int=None, pitch=None, _side:str="merged", _even

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down
36 changes: 20 additions & 16 deletions response_tools/telescope_parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,11 @@ def foxsi4_position2_detector_response(region:int=None, pitch=None, _side:str="m

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -528,10 +529,11 @@ def foxsi4_position3_detector_response(region:int=None, pitch=None, _side:str="m

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -662,10 +664,11 @@ def foxsi4_position4_detector_response(region:int=None, pitch=None, _side:str="m

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down Expand Up @@ -816,10 +819,11 @@ def foxsi4_position5_detector_response(region:int=None, pitch=None, _side:str="m

_event_type : `str`
Define the type of event trigger being considered in the
response. Must be in ["1hit", "2hit", ("all", "mix")].
Note: \"all\" and \"mix\" are the same but some from different
naming conventions on the merged and individual detector sides.
This will be fixed at some point in the future.
response. Must be in ["1hit", "2hit", "all"].
Note: \"all\" and \"mix\" (old) are the same but some from
different naming conventions on the merged and individual
detector sides. This has been fixed and all files use \"all\"
now.
Default: "all"

Returns
Expand Down
Loading