-
Notifications
You must be signed in to change notification settings - Fork 73
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
Update mc readers #693
Merged
Merged
Update mc readers #693
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
99114a1
Remove old MC to dictionary readers
andLaing 2249a2e
Add function to differentiate old and new file formats
andLaing 7fc7f04
Modify load_mchits_df to be able to read all formats
andLaing db932d3
Add function to cast hits df to dictionary
andLaing e3a8cfb
Modify load_mcparticles_df to read all file formats
andLaing c0efc57
Add function to get correct sample binning from file
andLaing 0b673c2
Modify load_mcsensor_response_df to work with both file formats
andLaing 6d7e37e
Add function to check sensor types present
andLaing b51d806
Add Enum class for MC table types
andLaing d95c480
Add function to get the MC tables in file
andLaing 49c1dbf
Add function to get list of events in file
andLaing 4c9f193
Update imports for mcinfo_io
andLaing ad2f821
Add function to load the nexus configuration
andLaing 28dc2b6
Add function to load the sensor positions table
andLaing ad1b2f8
Add function to load the MC generators table
andLaing c93ac1d
Add function to load the event mapping table
andLaing 14d12da
Add function to read all MC tables into a dictionary
andLaing 78483b3
Add a writer for the MC info to be copied to the output file
andLaing 43c1a74
Modify mcinfo_io.copy_mc_info to use the new readers/writers
andLaing d2dba9b
mcinfo_io_test with tests for new MC readers
andLaing dae3c05
New test files for mcinfo_test
andLaing 9184a3f
Adapt components.copy_mc_info for the new writer
andLaing f411298
Change fixture KrMC_true_hits to use DF based readers
andLaing 2b68010
Patch test_voxels_with_no_hits for load_mchits_df
andLaing 5629327
improve test_penthesilea_true_hits_are_correct
andLaing 012b8c7
Change setup for test_voxels_with_no_hits to use cast function
andLaing 74ce3b3
Add database relevant arguments for copy_mc_info to remaining cities
andLaing aac753f
Adapt diomira_test for new MC info copy
andLaing 21656fb
Adapt irene_test to use new mc readers
andLaing 42ab55a
Adapt penthesilea_test for new MC
andLaing f3e40c5
Show test_isidora_exact_result only fails because of MC output
andLaing a6f53f8
Adapt esmeralda_test for new MC
andLaing 8e9ecf4
Adapt beersheba_test to use the modern copy_mc_info code
andLaing 7a051b3
Remove obsolete mcinfo_io.mc_info_writer
andLaing 7912f3e
Remove mcinfo_io.mc_info_writer specific tests
andLaing a0e3454
Remove mc_info_writer test from indexation_test.py
andLaing ab4c22e
Improve test for cast_todict comparison to old method
andLaing 74dfb09
Fix clarifying comments for pandas gymnastics
andLaing d253632
Add exception for old format file in get_sensor_types
andLaing 8c3c5ee
Improve load_mcconfiguration for all file types
andLaing 7a22f34
Alter get_sensor_binning to use load_mcconfiguration
andLaing 7761d8e
Added warning to load_mcsensor_positions for oldformat
andLaing f4bb031
Remove unnecessary index check and raise in read_mc_tables
andLaing f4ffac6
Alter test_copy_mc_info_which_events_out_of_range to new conditions
andLaing cd3449c
Remove unnecessary try except from mcinfo_io.copy_mc_info
andLaing 389b68b
Improve error message in _get_list_of_events_new
andLaing 6368f81
Add warning and empty df return to get_sensor_binning
andLaing ac8640f
Add warning to components.copy_mc_info in case of no MC
andLaing 2babf44
Check warning in test_copy_mc_info_noMC
andLaing 9cf35fa
Add old/new format files for 3 types of simulation
andLaing b1c5acc
Add test comparing old and new format for same simulation
andLaing 6d77a01
Add missing column to old format mcparticles
andLaing 776a148
Change Pmt binning name for old mcconfiguration
andLaing e9bbb54
Added protection so empty mc sensor positions columns same
andLaing 4d2e0c0
Test comparing old and new format for same simulaitons
andLaing 37b3263
Add function to check for presence of MC group
andLaing 031bdc6
Check MC group present and give warning if not for copy_mc_info
andLaing 657d600
Change esmeralda_test to use get_event_numbers_in_file
andLaing afffd8f
Replace uses of pandas.testing.assert_frame_equal with IC function
andLaing 8b50df5
Remove unnecessary import from components.py
andLaing 3e94e98
Remove unused imports from mcinfo_io
andLaing 63a53fc
Add MCEventNotFound exception
andLaing d60f774
Use MCEventNotFound exception in components.copy_mc_info
andLaing 34fefac
Change run number for test_empty_events_issue_81
andLaing 51d9edc
Add str_col_length, columns_to_index keyword arguments in mc_writer
andLaing 41ef169
Updated mcinfo_io_test names
andLaing b636c82
Reset index in load_mcsensor_response_dfold
andLaing a495685
Remove unnecessary copies from get_Sensor_binning
andLaing 3114e8e
Add new file with fake MC group for exception tests
andLaing ec0387f
Add test to check KeyError raised if unrecognised MC table
andLaing 5a7063c
Add tests for get_event_numbers_in_file
andLaing 1437d3f
Add test for is_oldformat_file
andLaing ab03d3c
Add test warning raised without dabtabase in load_mcsensor_positions
andLaing 07ef509
Add test for load_mcsensor_response_df return_raw=True
andLaing 906c9f6
Add database arguments to cop_mc_info call in hypathia
andLaing 5ea7df3
Remove MC table comparison from hypathia_test
andLaing 22391fa
Remove unused imports from mcinfo_io_test
andLaing 2b64ef6
Remove unused MCParticle class
andLaing 17fc750
Remove unused MCParticleInfo class
andLaing a39abfc
Remove unused get_mc_info_safe
andLaing 90009f9
Changed get_sensor_binning tests to use DataFrame comparison
andLaing d1aec0e
Move mc_particle_and_hits_nexus_data fixture to mcinfo_io_test
andLaing 57aa97a
Move mc_sensors_nexus_data fixture to mcinfo_io_test
andLaing 7997926
Change drop in get_sensor_binning to not use inplace
andLaing 6b2241d
Add new test files for city exact results
andLaing bf37968
Use NEWMC files in cities exact result tests. All tables compared
andLaing 0daeb46
Protec get_sensor_binning from merged files
andLaing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 good at the end of file loop to check that all the events are actually found in the files; basically collect all
event_numbers_to_copy
and make sure that it is the same asevent_numbers
lits