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

Optimize pointing scripts #233

Merged
merged 3 commits into from
Nov 26, 2019
Merged

Optimize pointing scripts #233

merged 3 commits into from
Nov 26, 2019

Conversation

morcuended
Copy link
Member

As @vuillaut reported in #231, the code related to the addition of pointing information to the data stream was terribly slowing down the performance. It was basically reading the drive report file for every event.

@labsaha and I modified the code in order for the drive file to be open only once at the beginning of the script and buffer it to be used later on.

@labsaha, @vuillaut and @rlopezcoto can you please take a look at the modifications?

drive_container.altitude_avg = data['altitude_avg'].data
drive_container.time = drive_data['time'].data
drive_container.azimuth_avg = drive_data['azimuth_avg'].data
drive_container.altitude_avg = drive_data['altitude_avg'].data
Copy link
Member

Choose a reason for hiding this comment

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

do you think it would be worth reading the other data as well?
It could be used later to check that the pointing was not crazy... What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

do you think it would be worth reading the other data as well?
It could be used later to check that the pointing was not crazy... What do you think?

Yes, off course that would be good. In fact, the drive_data stores all information from the drive report. Only some of them are tagged as e,g. time, azimuth_avg, etc. Today we saw that the RA and DEC are also present in the Drive report. At present, there are no RA and DEC information in the DL1 files. They are indeed required for finer analysis and can be added as metadata in the DL1 file.

@vuillaut
Copy link
Member

Looks much better :)
Thank you!

@rlopezcoto
Copy link
Contributor

Hi all, thanks a lot. I think the one @vuillaut proposed is a nice improvement and you can maybe add an issue to keep track of it. I'll merge this now and make a bugfix release for you to include this information in the real data analysis.

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