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

Wobble in LST db #254

Merged
merged 10 commits into from
Sep 12, 2024
Merged

Wobble in LST db #254

merged 10 commits into from
Sep 12, 2024

Conversation

Elisa-Visentin
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.23%. Comparing base (cea9fa6) to head (26e8d52).
Report is 16 commits behind head on auto_MCP_DL2_DL3.

Additional details and impacted files
@@                Coverage Diff                @@
##           auto_MCP_DL2_DL3     #254   +/-   ##
=================================================
  Coverage             77.23%   77.23%           
=================================================
  Files                    21       21           
  Lines                  2614     2614           
=================================================
  Hits                   2019     2019           
  Misses                  595      595           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Elisa-Visentin
Copy link
Collaborator Author

Seems to work fine (I tested it on approx 1 y of data). Output is a new column in LST database
image

@Elisa-Visentin Elisa-Visentin marked this pull request as ready for review September 11, 2024 08:50
@aleberti
Copy link
Collaborator

two questions:

  • do you need only the wobble offset? you do not need the angles of the different wobbles? I would rename the column to wobble_offset anyway
  • if an observation was performed in ON mode, will the offset be 0?

@Elisa-Visentin
Copy link
Collaborator Author

We need only the offset (due to the IRFS, which are 0.4 point-like)

I retrieve the wobble from MAGIC file names (looking for a '-W after the source name), so, hopefully, it should be 0 (or not written in the name of the file with a -W pattern: I found some cases like that, but I have to investigate them) for ON obs.

@aleberti
Copy link
Collaborator

We need only the offset (due to the IRFS, which are 0.4 point-like)

ok

I retrieve the wobble from MAGIC file names (looking for a '-W after the source name), so, hopefully, it should be 0

better to check that it is actually 0 and not else.

(or not written in the name of the file with a -W pattern: I found some cases like that, but I have to investigate them) for ON obs.

it would be interesting to have cases where the patter for wobble is different from -WY.YY+ZZZ ... if you find some like that, please let me know.

@Elisa-Visentin
Copy link
Collaborator Author

I retrieve the wobble from MAGIC file names (looking for a '-W after the source name), so, hopefully, it should be 0

better to check that it is actually 0 and not else.
I would need to know which are the ON obs...

(or not written in the name of the file with a -W pattern: I found some cases like that, but I have to investigate them) for ON obs.

it would be interesting to have cases where the patter for wobble is different from -WY.YY+ZZZ ... if you find some like that, please let me know.

I found some of them, but I want to check if they are ON or just a 'wrong' name of the file

@aleberti
Copy link
Collaborator

if you need to know some observations that are surely in ON, there are the observations of SGR1935+2154 from 2021-2022. E.g. you can try the data from 2022-10-20 (LST convention, 2022-10-21 in MAGIC convention). Anyway, if the -WY.YY+ZZZ pattern is missing from the filename, then they are ON observations (you can cross-check of course, but the name of the files is given by the DAQ, whose code has not been touched since way before we started joint observations, so this is a pretty sure thing).

@Elisa-Visentin
Copy link
Collaborator Author

I was just checking SGR: the output of the script is '[]', so quite easily identifiable. If DAQ SW never uses the pattern '{source}-W' for ON obs. the script never associate a float/list of floats to them

@Elisa-Visentin
Copy link
Collaborator Author

Of course, in case some wobble obs. miss this pattern, they won't be 'listed' for the wobble evaluation...

@aleberti
Copy link
Collaborator

I was just checking SGR: the output of the script is '[]', so quite easily identifiable. If DAQ SW never uses the pattern '{source}-W' for ON obs. the script never associate a float/list of floats to them

ok, then I agree it is straightforward to get ON observations. Correct, the DAQ SW will use the pattern {source} when ON observations are performed. Of course there is always a way to have ON observations and have the pattern {source}-WY.YY+ZZZ in the filename, but that requires shifters to input 0 for wobble offset and all the wobble angles. I think this never happened since I am in MAGIC (I could be wrong, of course).

@Elisa-Visentin
Copy link
Collaborator Author

I removed one of the input DBs because they have a slightly different format and 2023 processing failed

in case they set weobble=0, the file will have a pattern {source}-W0.00+* and the output will be '[0.00]' (in the hp that the wobble offset did not change during an LST run, which seems fine up to now)

@Elisa-Visentin
Copy link
Collaborator Author

Elisa-Visentin commented Sep 11, 2024

it would be interesting to have cases where the patter for wobble is different from -WY.YY+ZZZ ... if you find some like that, please let me know.

run 05109639, '--W....' 😕

@aleberti
Copy link
Collaborator

that would be a problem if for some reason the source name ends exactly with -W. Then, to guard yourself against this (unlikely but possible) case, you cannot simply search for the pattern -W. The most solid approach would be to search for the pattern -WY.YY+ZZZ via a regex. If that pattern is found, then you have the wobble information. If not, it is ON.

@Elisa-Visentin
Copy link
Collaborator Author

I search for the -w patetrn after 'removing' the source name (with a split on it), so, I am actually looking for {source}-W

@Elisa-Visentin
Copy link
Collaborator Author

actually, also if source name ends with '-' I don't consider that '-' while looking for -W
While if I search '-WY.YY+Z.ZZ' over the while file name I could find the wrong match/wobble if the source has the '-WY.YY+Z.ZZ' INSIDE its name (this would be quite a strange name for a source, but not impossible at least in theory)

@aleberti
Copy link
Collaborator

I checked into the MAGIC database and I do not find sources with such a pattern. I found sources with -W in the name, but last time they were observed was in August 2019, so before the first date of joint observation in our table. In any case, since you get the source names from "your" database, then even if the whole wobble pattern were present in the source name, you would get the wobble information correctly.

Copy link
Collaborator

@jsitarek jsitarek left a comment

Choose a reason for hiding this comment

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

just a tiny suggestion to simplify a bit the code, otherwise it is fine with me and we can merge

@jsitarek jsitarek merged commit f4b775e into auto_MCP_DL2_DL3 Sep 12, 2024
6 checks passed
@jsitarek jsitarek deleted the wobble branch September 12, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants