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

Obtain time stamps from three different sources (UCTS, TIB and Dragon modules) #240

Merged
merged 5 commits into from
Dec 12, 2019

Conversation

morcuended
Copy link
Member

@morcuended morcuended commented Dec 2, 2019

As mentioned in Issue #227 here I include the possibility of getting the timestamps from three different sources: UCTS, TIB counters and Dragon modules counters. The three timestamps will be stored in the dl1 parameter tables. Even if it is redundant information, for the time being, it will give us continuity in the time values since Dragon counters are quite stable and every now and then UCTS timestamp and TIB counters stop working fine.

Still, there is the question of which time info we should take by default. Right now it is TIB.

What do you think @FrancaCassol @rlopezcoto @vuillaut @labsaha?

@rlopezcoto
Copy link
Contributor

what about NTP as discussed in #235?

@morcuended
Copy link
Member Author

morcuended commented Dec 9, 2019

what about NTP as discussed in #235?

NTP, taken as event.lst.tel[telescope_id].svc.date, is the same for all the subruns of each run. So it cannot be used for this purpose.

@FrancaCassol
Copy link
Collaborator

Hi @morcuended, @rlopezcoto

what about dragon time as said yesterday? (I will just take the module zero)
I will can do change in the reader I need anyway to make PR for changing the geometry file

@morcuended
Copy link
Member Author

Hi @morcuended, @rlopezcoto

what about dragon time as said yesterday? (I will just take the module zero)
I will can do change in the reader I need anyway to make PR for changing the geometry file

Yes, @FrancaCassol, timestamps can already be calculated in the ctapipe_io_lst reader. However, I just included them here to keep the three of them in the output dl1 files in case we need to compare them. Maybe it would be convenient for the time being to not select any of them in ctapipe_io_lst but just calculate them and dump them here.

@morcuended
Copy link
Member Author

Hi again @FrancaCassol, Isidro suggested me to take the counters from the module placed at the center of the camera, i.e. index number 82, instead of taking the module with index 0 which corresponds to one at the edge (is this correct?). In principle, all the modules counters are quite stable up to a precision of ~100-200 ns

@FrancaCassol
Copy link
Collaborator

Hi @morcuended,
Actually the central module is the 132 (starting from zero). No problem, I can use it.

@FrancaCassol
Copy link
Collaborator

However, I just included them here to keep the three of them in the output dl1 files in case we need to compare them. Maybe it would be convenient for the time being to not select any of them in ctapipe_io_lst but just calculate them and dump them here.

I fill uncomfortable to have zero time in the r0 container. The dragon time is always there, let use it for the moment. Unfortunately, I can not dump the information in your container because it is not defined at ctapipe_io_lst level. I suggest for the moment that I provide the the dragon time and you calculate and store all the other one. What do you think?

@morcuended
Copy link
Member Author

However, I just included them here to keep the three of them in the output dl1 files in case we need to compare them. Maybe it would be convenient for the time being to not select any of them in ctapipe_io_lst but just calculate them and dump them here.

I fill uncomfortable to have zero time in the r0 container. The dragon time is always there, let use it for the moment. Unfortunately, I can not dump the information in your container because it is not defined at ctapipe_io_lst level. I suggest for the moment that I provide the the dragon time and you calculate and store all the other one. What do you think?

That is fine with me. I defined them already in lstcontainer and can store them in dl1 files.

@IsidroAguadoRuesga
Copy link

Hi @morcuended,
Actually the central module is the 132 (starting from zero). No problem, I can use it.

Hi @FrancaCassol, you are right that the central module has module ID 132 but has Module Index 82.

@morcuended
Copy link
Member Author

I remove the lines that were converting timestamps already in UNIX format (1.57...e9) to GPS format since the latter is not used anywhere else. Besides, timestamps in the drive report are also in UNIX format.

Copy link
Contributor

@rlopezcoto rlopezcoto left a comment

Choose a reason for hiding this comment

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

@morcuended @FrancaCassol this PR (after my minor comment) should be good to go, right?

@@ -340,7 +355,7 @@ def r0_to_dl1(input_filename=get_dataset_path('gamma_test_large.simtel.gz'),
writer.write(table_name=f'telescope/image/{tel_name}',
containers=[event.r0, tel, extra_im])
writer.write(table_name=f'telescope/parameters/{tel_name}',
containers=[dl1_container])
containers=[dl1_container])
Copy link
Contributor

Choose a reason for hiding this comment

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

please align

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@rlopezcoto rlopezcoto merged commit 7ff993a into cta-observatory:master Dec 12, 2019
@morcuended
Copy link
Member Author

@morcuended @FrancaCassol this PR (after my minor comment) should be good to go, right?

In principle, this is working already as it is. I just wanted to avoid redundant code between this script and the init.py script of ctapipe_io_lst where the counters are defined. I think is fine like this.

@morcuended morcuended deleted the timing branch December 12, 2019 10:15
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.

4 participants