-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hillas parameters in telescope frame (#1591)
* Cache files by full url/path * Fix part file not deleted on ctrl c * Add container for nominal reconstruction of hillas parameters - x,y replaced by lon and lat - units changed to deg from m * Add method to calculate hillas parameters in the nominal frame - Requires pixel positions in the nominal frame instead of a geom object - Most of the code is a duplicate of the reconstruction in the camera frame for now * Remove second hillas parameters function - Decide which container to return based on pixel position unit * Add containers for nominal frame and fix hillas-related parameters * Use image parameters in nominal frame, bump data level version - Save image parameters calculated in the nominal frame - This affects the hillas parameters and the timing slope - The coordinate transformations happen in the image processor * Fix import * Clean up container structure, use telescope frame for image parameters - Stage 1 and the connected tools now calculate the hillas parameters in the telescope frame - Hillas and TimingParametersContainer now store values as deg. Old containers persist as CameraHillas/TimingParametersContainer - In order to keep a single ImageParametersContainer, base containers have been added for hillas and timing parameters - Failing tests adapted: x/y -> lon/lat, reconstruction algorithms use the CameraHillasParametersContainer * Precompute camera geometries * Fix unit test - Value changed slightly due to differences in the camera readout definitions (#1588) * Rename lon/lat to fov_lon/fov_lat * Fix use of ImageParametersContainer - Avoid base containers and thus lacking columns in the output file * Address codacy complaints * Fix default ImageParametersContainer - Sets the Hillas/Timing parameters container in the telescope frame as default values as opposed to the base containers * Change datamodel version - Replace v1.0.4 with v1.1.0 since column names have changed on top of the units * Use fov_lon/lat instead of x/y * Distinguish between CameraHillasParametersContainer and HillasParametersContainer * Adapt hillas intersection to work with hillas parameters in the telescope and camera frame * Remove duplicated tests of the results - Comparing values between both reconstructions should handle all cases - Comparing results in the telescope frame to fixed values was error prone, because the image is generated in the camera frame requiring explicit conversion every time * Remove unused declarations and imports * Fix datamodel version * Fix unit test - The test file gets generated by calling stage1 on a simtel file, so this has to take the current datamodel into account * Fix comparison to nan in unit tests * Fix reading of dl1 files - Add v1.3 to the list of supported datamodel versions - The renaming of the parameter containers changed the default container prefixes (HillasParametersContainer -> CameraHillasParametersContainer leads to the camera_hillas prefix), breaking backwards compatibility - This is fixed by specifying explicit prefixes when reading <v1.3 files * Fix tests for the dl1eventsource - Improper comparison to np.nan lead to tests effectively being skipped - The assertion would have failed actually, because the test file contains nan events (which is expected) - The new test checks if all entries are nan instead. Due to the event loop in the event source, this requires collecting the values in a list first * Write out correct datamodel version * Fix unit test * Try to fix the docs by making the base containers private * Fix codacy complaints * Add base containers to __all__ - This seems to be necessary for the sphinx docs * Add option to choose camera frame instead of telescope frame * Remove unused import * Add missing underscore * Fix selection of camera frame geometry * Fix test converting to wrong unit * Add missing variable name * Use traits for the selection of the frame * Fix unit test Co-authored-by: Maximilian Nöthe <[email protected]>
- Loading branch information
1 parent
54fa679
commit fc98748
Showing
18 changed files
with
485 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.