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

Simtools for single pe derivation #1299

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Simtools for single pe derivation #1299

wants to merge 9 commits into from

Conversation

GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Jan 6, 2025

Add a simtool to derive (normalize) the single p.e. amplitude spectrum. At this point, all what it does is to call the norm_spe tool of sim_telarray and write the output both in the format required by sim_telarray and as an astropy table (enriched with metadata).

Plan is to replace norm_spe at a later stage by a simtool.

This PR also includes a small reorganization: camera related modules have now their own main module simtools.camera (e.g., camera_efficiency has been moved there).

Allowed input are:

  • space / comma separated csv files
  • ecsv table

Missing:

@GernotMaier GernotMaier self-assigned this Jan 6, 2025

This comment has been minimized.

This comment has been minimized.

1 similar comment

This comment has been minimized.

@GernotMaier GernotMaier requested a review from Copilot January 6, 2025 13:43

Choose a reason for hiding this comment

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

Copilot reviewed 7 out of 14 changed files in this pull request and generated no comments.

Files not reviewed (7)
  • tests/resources/LST_afterpulses.dat: Language not supported
  • tests/resources/SinglePhe_spectrum_totalfit_19pixel-average_20200601.csv: Language not supported
  • tests/unit_tests/camera/test_camera_efficiency.py: Evaluated as low risk
  • tests/conftest.py: Evaluated as low risk
  • pyproject.toml: Evaluated as low risk
  • src/simtools/applications/validate_camera_efficiency.py: Evaluated as low risk
  • tests/unit_tests/simtel/test_simulator_camera_efficiency.py: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/simtools/camera/single_photon_electron_spectrum.py:133

  • Potential file reading error. Add a try-except block to handle file reading errors.
with open(self.args_dict['input_spectrum'], encoding='utf-8') as f:

This comment has been minimized.

This comment has been minimized.

Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage 100.00% Coverage (93.30% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

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.

1 participant