Closed tmcahill closed 2 years ago
Thanks for the quick review Dr. Maier!
v2dl3-vegas CI is successful. Fits differences are accounted for:
RAD_MAX
was bugged in the main branch. My new way seems to work correctly, as the EA file for point-like-1 has a T^2 upper of 0.01RAD_MAX
is also correct for the point-like-2 EA file which has a T^2 upper of 0.005
This v2dl3-vegas patch contains optimization and new options for event filling.
This update is not as large as the line count implies. Most is from refactoring
EventClass.py
and parts ofirfloader.py
intoEffectiveAreaFile.py
for the optimization.New features
-r
flag to select reconstruction type; standard (default) or ITM-nf
flag to disable automatic FoV cuttingOptimization
EffectiveAreaFile
objects now wrap all effective area files in v2dl3-vegas. This is necessary for a few reasons:This also makes the code cleaner. I was able to streamline a lot of code where there were previously multiple behaviors for whether or not EA files were being wrapped by an
EventClass
. ReplacingEventClass
and associated var names withEffectiveAreaFile
is more clear than how I'd previously used event class names in behaviors that weren't exclusive to event class mode.Runtime
I measured runtime for this optimization using 3 program runs of 12-run runlists. Outputs from the runtime tests were compared with fitsdiff and found to have no differences.
Runtime was 2.5x faster when not using event classes:
Runtime was 3x faster when using two event classes:
Our computer cluster yielded very similar results. v2dl3-vegas is now more than twice as fast.
All features from this branch have been independently tested and verified with fitsdiff. Control tests for pre-existing use cases were also ran and compared to main branch outputs.
Changelog
genHDUList.py
VegasDataSource
constructor accordinglyv2dl3_for_vegas.py
runlist_to_file_pair()
now thatEffectiveAreaFile
wraps all EA filesEffectiveAreaFile
wraps all EA filesEffectiveAreaFile
updatesEventClass.py -> EffectiveAreaFile.py
VegasDataSource.py
andirfloader.py
__build_index__()
fromirfloader.py
get_safe_energy()
fromirfloader.py
VegasDataSource.py:
effective_area
changed toea_files
EffectiveAreaFile
wrapper requirementEffectiveAreaFile.py
EffectiveAreaFile
wraps all EA filesfillEVENTS_not_safe.py:
ea_files
positional argumentEffectiveAreaFile
wraps all EA filesreco
variable now stores ITM or standard reconstruction from the selectedEventsTreefillRESPONSE_not_safe.py:
EffectiveAreaFile
wraps EA filesirfloader.py:
EffectiveAreaFile
wraps EA filesIRFLoader
object refactored intoEffectiveAreaFile
getIRF()
now a standalone function rather than a class function of IRFLoadermanager
andaxis_dict
load from the provided event_class rather than the previous IRFLoader class.For VEGAS review
Should be easy, not much was added that wasn't already being done in V2DL3.
fillEVENTS_not_safe.py
EffectiveAreaFile.py
ROOT operations. These may not need much scrutiny as they were simply moved over fromirfloader.py