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

Light Sim Addition #39

Merged
merged 33 commits into from
Nov 29, 2021
Merged

Light Sim Addition #39

merged 33 commits into from
Nov 29, 2021

Conversation

tairaeli
Copy link

@tairaeli tairaeli commented Nov 4, 2021

Added a light simulation model relying on a light lookup table. Made some additions to a few of the other modules to account for these additions.

Copy link
Collaborator

@soleti soleti left a comment

Choose a reason for hiding this comment

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

I left some comments in line, mainly about hardcoded numbers and documentation. Thanks!

larndsim/consts.py Outdated Show resolved Hide resolved
larndsim/lightLUT.py Outdated Show resolved Hide resolved
def GetVoxel(pos,lut_geometry): # Determines which voxel is being called based on the position of the edep. Voxels are indexed 0-2911

(lut_min,lut_max,lut_ndiv) = lut_geometry
vox_xyz = np.floor(pos/(lut_max-lut_min)*lut_ndiv).astype(int)+lut_ndiv/2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't quite understand here, you apply the floor function, then cast to integer and then add a float? What's a typical value for lut_ndiv?

Copy link
Contributor

Choose a reason for hiding this comment

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

this function now gets the voxel from the global coordinate system with a single int call (see https://github.com/tairaeli/larnd-sim/blob/larnd-branch/larndsim/lightLUT.py#L33)

larndsim/lightLUT.py Outdated Show resolved Hide resolved
larndsim/lightLUT.py Outdated Show resolved Hide resolved
larndsim/lightLUT.py Outdated Show resolved Hide resolved
larndsim/lightLUT.py Outdated Show resolved Hide resolved
larndsim/quenching.py Outdated Show resolved Hide resolved
larndsim/quenching.py Outdated Show resolved Hide resolved
larndsim/lightLUT.py Outdated Show resolved Hide resolved
DanielMDouglas and others added 26 commits November 9, 2021 17:07
…ell as some of the comments on some of the lines of code that were not clearly explained
…Not complete yet. Still need to be fully integrated into the rest of the lightLUT
…n. Also removed the get_lut_geometry function and added the lut geometries to the module0.yaml file. Testing still required
…ulation. Fixed errors in coordinate translation
Copy link
Collaborator

@soleti soleti left a comment

Choose a reason for hiding this comment

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

I think the PR looks very good. I just have a couple of minor comments that should be quick to address. Thank you for your patience.

larndsim/consts.py Outdated Show resolved Hide resolved
cli/simulate_pixels.py Outdated Show resolved Hide resolved
@soleti soleti closed this Nov 29, 2021
@soleti soleti reopened this Nov 29, 2021
@soleti soleti merged commit 69ce343 into DUNE:master Nov 29, 2021
infophysics pushed a commit to infophysics/larnd-sim that referenced this pull request Jul 14, 2023
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.

5 participants