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

Pointing modules fail when no time info is available #235

Closed
morcuended opened this issue Nov 27, 2019 · 7 comments
Closed

Pointing modules fail when no time info is available #235

morcuended opened this issue Nov 27, 2019 · 7 comments

Comments

@morcuended
Copy link
Member

I just spotted another bug in the usage of the pointing module. I tried to interpolate the pointing position for a whole run. Since in the current version of lstchain, only the time coming from the TIB is being used provided its presence flag is OK, sometimes it happens that there is no time info (it is set to -1 indeed) so the interpolation of the pointing coordinates fails.

Thus, if you try it or have done it already, it will probably fail. I suggest not using the pointing for the time being. Sorry for the inconvenience.

I will modify the code in order to add pointing info only when correct time values are available.

@mdpunch
Copy link

mdpunch commented Dec 3, 2019

A suggestion, for the pointing, since it doesn't require nanosecond precision or anything close to it:
The fallback time for the pointing could be just the NTP time of the machine with the event builder (as long as this has NTP set-up correctly). So if there is neither UCTS nor TIB time, then this time would be enough to do pointing corrections.

@moralejo
Copy link
Collaborator

moralejo commented Dec 3, 2019 via email

@labsaha
Copy link
Collaborator

labsaha commented Dec 3, 2019

I would always keep that machine NTP time in the data (not just as
fallback), the decision of using it or not can be taken later, right?

I am also in favor of keeping NTP time in data. By data, I think you meant in DL1 data.

@morcuended
Copy link
Member Author

A suggestion, for the pointing, since it doesn't require nanosecond precision or anything close to it:
The fallback time for the pointing could be just the NTP time of the machine with the event builder (as long as this has NTP set-up correctly). So if there is neither UCTS nor TIB time, then this time would be enough to do pointing corrections.

Thanks for the suggestion @mdpunch! I will run some tests in order to check if the granularity of the NTP time is enough for the pointing interpolation. I will add these timestamps as well.

@mdpunch
Copy link

mdpunch commented Dec 3, 2019

Thanks for the suggestion @mdpunch! I will run some tests in order to check if the granularity of the NTP time is enough for the pointing interpolation. I will add these timestamps as well.

The Earth turns at 360° per day, or 15° per hour!
NTP should be accurate to 1ms, or at worst 10ms.
The CTA requirements for the source localization, for MST/SST it is < 5 arcseconds (per axis), and for LST it's 10 arcseconds (per axis) in A-PERF-0220.
So for the LST the 10 arcsecond implies that the timing should be accurate to 667ms seconds (or 0.667s).
So, it should be no problem to use NTP for the pointing.

@morcuended
Copy link
Member Author

I think I have mixed up several things. Let me try to clarify them:

  • The NTP absolute timestamp I am using is the same for every sub-run within each run. So we do not have an event-based (nor even subrun-based) NTP time. To calculate the event-wise absolute timestamps I add the pps and tenMHz counters to it. Hence we cannot use what I call here NTP time to interpolate pointing values.
  • In absolute terms, I think we should stick with UCTS timestamps. If there is an offset of ~150 secs between the time we are getting (right now from the TIB) and the actual time, the pointing will have an offset as well.
  • If this time offset between UCTS and the other two timestamps we could try to calculate the timestamps out of Dragon modules or TIB correcting by this time offset provided the UCTS fails.
  • I agree we do not need such high precision in time to interpolate the pointing but these are the event-wise timestamps we have to my knowledge.

rlopezcoto added a commit that referenced this issue Dec 9, 2019
@rlopezcoto
Copy link
Contributor

The original reason for this issue was solved in #239. The rest of the discussion is probably better moved to #227

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

No branches or pull requests

5 participants