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

Add support for external custom data #4

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

HealthyPear
Copy link
Member

This PR adds support for loading data from file built using astropy and saved in ECSV format like the public data shipped with the package.

Documentation has been updated accordingly

@SeiyaNozaki you can test this by installing and switching to this branch; you can compile the new docs locally (see instructions) - let me know if you can replicate (correctly) your previous results

Closes #1 #2

Copy link

@SeiyaNozaki SeiyaNozaki left a comment

Choose a reason for hiding this comment

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

Hi @HealthyPear ! Thanks for the implementation!:)
I tried the script, but got some errors as below:

if not performance_data:
energy_bins, gamma_rate, background_rate = prepare_data(config)
else:
energy_bins, gamma_rate, background_rate = prepare_data(performance_data)

Choose a reason for hiding this comment

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

Here we need to put both of config and performance_data

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

raise NotImplementedError(
"MAGIC SUM trigger at mid zenith range has not been yet implemented."
)
if ("LST" in performance_metadata) and config["sum_trigger"]:

Choose a reason for hiding this comment

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

performance_metadata is not assigned when not using performance_data, so I got an error when I launched the script without custom dataset

Copy link
Member Author

Choose a reason for hiding this comment

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

correct, this is related to the thread above

Comment on lines 66 to 67
# - {name: gamma_rate, datatype: float64}
# - {name: background_rate, datatype: float64}

Choose a reason for hiding this comment

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

I think it would be nice to add unit for gamma_rate and background_rate as examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

right, when I produced this example table I forgot the units for this columns!

Copy link
Member Author

@HealthyPear HealthyPear Sep 19, 2024

Choose a reason for hiding this comment

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

should be better now, I basically copied the header from the MAGIC low energy data file

@HealthyPear
Copy link
Member Author

I have to fix the conflicts before merging...the CLI is now unified under a single entry point

@HealthyPear
Copy link
Member Author

@SeiyaNozaki should be all working now, can you re-review? :)

@HealthyPear HealthyPear added this to the v0.1.0 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auxiliary data enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve integration with external data
2 participants