summaryrefslogtreecommitdiff
path: root/chroma
AgeCommit message (Collapse)Author
2021-05-09Replace all uses of numpy.count_nonzero() with chroma.tools.count_nonzero to ↵Stan Seibert
remove requirement to use numpy >= 1.6
2021-05-09Add a summing mode to the event view.Stan Seibert
Press "s" and average time, charge and hit probability are computed for all of the events in the input file. Then you can cycle through the different values using the "." key, just as you can for single events. You can flip between sum and regular modes, and the sum calculation is only done the first time.
2021-05-09Make chroma.io.root.RootReader follow the Python iterator protocol.Stan Seibert
Now you can do: reader = RootReader('file.root') for ev in reader: # Do stuff
2021-05-09Make the period key cycle between charge, time and hit/no-hit color display ↵Stan Seibert
in event viewer
2021-05-09Fix silly bug in RootReader.jump_to()Stan Seibert
2021-05-09Add optional argument to pi0 gun to pick direction of one gamma in rest frame.Stan Seibert
2021-05-09Allow chroma to be imported on systems without pygame. Good for clusters.Stan Seibert
2021-05-09Major overhaul to the way that DAQ and PDF information is accumulatedStan Seibert
to speed up likelihood evaluation. When generating a likelihood, the DAQ can be run many times in parallel by the GPU, creating a large block of channel hit information in memory. The PDF accumulator processes that entire block in two passes: * First update the channel hit count, and the count of channel hits falling into the bin around the channel hit time being evaluated. Add any channel hits that should also be included in the n-th nearest neighbor calculation to a channel-specific work queue. * Process all the work queues for each channel and update the list of nearest neighbors. This is hugely faster than what we were doing before. Kernel estimation (or some kind of orthogonal function expansion of the PDF) should be better ultimately, but for now the nearest neighbor approach to PDF estimation seems to be working the best.
2021-05-09Add a select function to GPUPhotons to extract a reduced list of photons ↵Stan Seibert
that all have a particular interaction process code set. Handy for selection just the detected photons from a large list of photons.
2021-05-09Use global per-thread ZeroMQ context rather than make a new one.Stan Seibert
2021-05-09Minor fixes to doing time & charge PDFs via kernel estimation. ThingsStan Seibert
still look off, but this is an improvement.
2021-05-09OK, we really do need to call the garbage collector this frequently.Stan Seibert
2021-05-09constant_particle_gun now can generate pi0 decaysStan Seibert
2021-05-09Factor calculation of channel hit probabilities and PDF densities to ↵Stan Seibert
separate function for easier debugging of channel-level likelihood behavior.
2021-05-09Reduce the bin count requirement from 200 to 50.Stan Seibert
2021-05-09Clean up hit probability calculation and stop skipping the first entry.Stan Seibert
2021-05-09Fix returning from PDF accumulator too soon.Stan Seibert
2021-05-09Period key in event viewer flips between charge and time displayStan Seibert
2021-05-09Fix units when drawing photon verticesStan Seibert
2021-05-09Stop returning the PDF probabilities and put the hit/not hit back into the ↵Stan Seibert
likelihood
2021-05-09Add a few more commonly used symbols to: from chroma import *Stan Seibert
2021-05-09Write t0 for primary vertex to ROOT file and fix unit test to catch this.Stan Seibert
2021-05-09Mercurial subrepositories don't seem to work enough like SVN externalsStan Seibert
to automatically pull in Tony's histogram classes when someone clones the repository. Now the histogram code has been copied and committed as part of chroma. Maybe someday we can drop this when histogram is an installable python package.
2021-05-09Initial import of Chroma from private to public repository.Stan Seibert
Apologies for the lack of history, but Chroma's prehistory included some very large files and possibly proprietary engineering data. Rather than clutter up the public repository (and panic people), we are starting fresh. All development happens here from now on.
2011-10-11Stop returning the pdf probabilities and put the hit/not hit back intoStan Seibert
the likelihood.
2011-10-11Add a few more commonly used symbols to: from chroma import *Stan Seibert
2011-10-10Now that solids and channels have separate numbering, we have to map ↵Stan Seibert
channels back to solid indices to set colors when displaying an event.
2011-10-08Add a helper module to the chroma.models directory that takesStan Seibert
inventory of all the .stl/.stl.bz2 files present and creates building functions for each of them in the models module. This allows usage like the following: chroma-cam chroma.models.lionsolid chroma-cam chroma.models.tie_interceptor6 You don't need to worry about where the chroma package was actually installed. Loading from STL files listed on the command line still works, of course.
2011-10-08Make Camera.build work with anything callable, not just functions. Also ↵Stan Seibert
make plain meshes more opaque because the high transparency is visually confusing.
2011-10-08Photon history constants in Python.Stan Seibert
2011-10-07Speed up remove_duplicate_vertices by a factor of 3.Stan Seibert
Vectorizing a lambda function is really slow, and it turns out that advanced indexing already does what we want to remap the triangle vertices to their unique values.
2011-10-07Rewrite mesh_grid to be less compact but 100x faster.Stan Seibert
Most of the time required to build the LBNE geometry is spent on mesh_grid() for the highly segmented cylinder. (67 seconds!) The speed hit is caused by the use of zip to connect the vertices. The same task can be done in several lines with slice notation, and goes much faster.
2011-10-07Speed up Geometry.build() by a large factor when loading from cache.Stan Seibert
A bunch of small tricks have been applied to reduce the amount of time required to build an already cached geometry: * Replace uses of fromiter() on long sequences with code that operates on bigger arrays. * Use memoization on the Solids to more efficiently map materials to material codes when a solid is repeated (as is the case in all our detectors) * Use numpy.take() instead of fancy indexing on big arrays. I learned about this trick from: http://wesmckinney.com/blog/?p=215 Also, switched over to compressed npz files for storing cache information. They take the same size as the gzipped pickle files, but load 30% faster.
2011-10-07Create a Detector class to hold information about the PMTs in aStan Seibert
geometry, like the mapping from solid IDs to channels, and the time and charge distributions. Detector is a subclass of Geometry, so that a Detector can be used wherever a Geometry is used. Only code (like the DAQ stuff) that needs to know how PMT solids map to channels should look for a Detector object. There is a corresponding GPUDetector class as well, with its own device side struct to hold PMT channel information. The GPU code now can sample an arbitrary time and charge PDF, but on the host side, the only interface exposed right now creates a Gaussian distribution.
2011-10-05Missing glass parameter in build_pmt_shell()Stan Seibert
2011-10-05Epic port of Chroma from units of meters/seconds/MeV toStan Seibert
millimeters/nanoseconds/MeV in order to match GEANT4, and also avoid huge discrepancies in magnitude caused by values like 10e-9 sec. Along the way, cleaned up a few things: * Switch the PI and SPEED_OF_LIGHT constants from double to single precision. This avoid some unnecessary double precision calculations in the GPU code. * Fixed a silly problem in the definition of the spherical spiral. Now the demo detector looks totally awesome. Also wrapped it in a black surface. Demo detector now has 10055 PMTs. * Updated the test_ray_intersection data file to reflect the new units. * Fix a missing import in chroma.gpu.tools
2011-10-05Fix floating point exception generated in PyROOT when dealing with no hit ↵Stan Seibert
channels.
2011-10-05The demo/detector.py module is no longer used.Stan Seibert
2011-10-05Default values for required arguments in the make.* functions creates confusion.Stan Seibert
2011-10-05Add tlatorre/histogram as a subrepository so that we can use it in the ↵Stan Seibert
Rayleigh scattering unit test
2011-10-05Kernel estimation implementation for calculating PDFs at each PMT.Stan Seibert
A little rough around the edges, and still needs some development work.
2011-10-05Calling the garbage collector explicitly is very expensive and gets ↵Stan Seibert
progressively slower the longer the program runs. Need to find another way to deal with running out of GPU memory due to reference cycles in PyCUDA.
2011-10-03Split out CUDA PDF functions into separate .cu file.Stan Seibert
2011-10-03Output device usage to logger.Stan Seibert
2011-10-03Create a chroma.log module that provides the default logger object forStan Seibert
the package. Rather than use the logging module directly, we wrap it with this to ensure that logger.basicConfig() is called automatically. All chroma code should use this logger for printing status information so that it can be hidden when chroma is part of a bigger application.
2011-09-30Test if root.C classes have been loaded before loading in root.py. Prevents ↵Stan Seibert
printed warnings when the user already has a .rootlogon.C to load the Chroma ROOT classes.
2011-09-30ROOT sucks and the TApplication object created by PyROOT interpretsStan Seibert
the contents of sys.argv whether you want it to or not. A simple hack is to blank out sys.argv around the point where you import ROOT. As an additional requirement, you have to actually use the ROOT module for something (even just looking up a class) in order for the TApplication to be initialized, so you can't just replace sys.argv with an empty array around the ROOT import. To ensure this is always done correctly, all Chroma modules that need ROOT should obtain it by: from chroma.rootimport import ROOT
2011-09-29Allow loading of bzip2 compressed binary stl files and reduce size of the ↵Stan Seibert
models directory
2011-09-29Removing portal gun models to shrink the packageStan Seibert
2011-09-29Move checkerboard into demo packageStan Seibert