Skip to content

Commit

Permalink
Changing X/Yoff to X/YDET
Browse files Browse the repository at this point in the history
  • Loading branch information
steob92 committed Jan 8, 2024
1 parent e3b59dd commit 4f1159e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyV2DL3/eventdisplay/fillEVENTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def __fill_event_list(file, runNumber, select, seconds_from_reference):
evt_dict["AZ"] = DL3EventTree["Az"][mask]
evt_dict["ENERGY"] = DL3EventTree["Energy"][mask]
evt_dict["EVENT_TYPE"] = DL3EventTree["NImages"][mask]
evt_dict["Xoff"] = DL3EventTree["Xoff"][mask]
evt_dict["Yoff"] = DL3EventTree["Yoff"][mask]
evt_dict["XDET"] = DL3EventTree["Xoff"][mask]
evt_dict["YDET"] = DL3EventTree["Yoff"][mask]
try:
# Test if anasum file was created using the all events option.
# In this case write out the additional output.
Expand Down
4 changes: 2 additions & 2 deletions pyV2DL3/fillEVENTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def fillEVENTS(datasource, save_multiplicity=False, instrument_epoch=None, event
# Test if key exists in evt_dict. If yes, add these columns.
add_existing_column(columns, evt_dict, name="ALT", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="AZ", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="Xoff", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="Yoff", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="XDET", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="YDET", format="1E", unit="deg")
add_existing_column(columns, evt_dict, name="MSW", format="1D")
add_existing_column(columns, evt_dict, name="MSL", format="1D")
add_existing_column(columns, evt_dict, name="IS_GAMMA", format="1L")
Expand Down

2 comments on commit 4f1159e

@GernotMaier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steob92 - this is correct, thanks.

Note that it is called DETX, DETY and not XDET, YDET.

The question is if the naming is important enough to merit a complete reprocessing of all files (DL3 step), or if you can add a fix into the background model generator. I agree that it should be correct for all future processing.

Could you also check the FOValign is set correctly in the header, as outlined in the GADF doc?

Please open a PR.

@steob92
Copy link
Contributor Author

@steob92 steob92 commented on 4f1159e Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GernotMaier I don't think we need to rerun, for the moment I'll add a try block to check Xoff vs DETX vs whatever VEGAS' standard is.

I'm not 100% sure if my understanding is correct. In ED there is X/Yoff and X/Yoff_derot.

Here we use X/Yoff which is the "Gamma Point-Of-Origin, in camera coodinates (coodinates -> coordinates link to typo) in (deg)"
While X/Yoff_derot is "Derotated Gamma Point-Of-Origin (deg, RA/Dec)".

So X/Yoff would refer to FOVALIGN=ALTAZ and X/Yoff_derot would refer to FOVALIGN=RADEC.

Does this sound correct to you?

Perhaps explicitly using X/Yoff_derot would remove any ambiguity?

I'll open an issue under gammapy-tools (slowly migrating to public) to check the coordinates.

Please sign in to comment.