Skip to content

Conversation

@diaza
Copy link
Member

@diaza diaza commented Nov 9, 2025

As title says.
EDIT: Here's the talk where I went over the issues seen. If anyone missed it and would like a more detailed explanation, let me know and we can chat.
EDIT: I'm adding everyone think might have any familiarity with the LUTs. No need to actually review if this isn't within your purview.
To reflect the y-axis in the LUT, I used the following code:

import numpy as np

def swap_y(filename, outfile):
    data = np.load(filename)['arr']
    arr = data.copy()
    arr = arr [:, ::-1, :, :]
    n_op_chan = arr.shape[-1]
    arr[..., :n_op_chan//2] = arr[..., :n_op_chan//2][...,::-1]
    arr[..., n_op_chan//2:] = arr[..., n_op_chan//2:][...,::-1]
    np.savez_compressed(outfile, arr=arr)
    return

filename = "/global/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_Mod0_06052024_time_norm.npz"
outfile = filename.replace(".npz", "_swapped_y.npz")
swap_y(filename, outfile)

filename = "/global/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_Mod123_06052024_time_norm.npz"
outfile = filename.replace(".npz", "_swapped_y.npz")
swap_y(filename, outfile)

Flipping for FSD shouldn't be necessary.
The optical channel mapping will have to be remapped in flow.

@diaza
Copy link
Member Author

diaza commented Nov 11, 2025

I've opened PRs for op channel remaps for 2x2 and FSD.

@diaza diaza marked this pull request as ready for review November 11, 2025 07:52
@liviocali
Copy link
Member

@diaza I did not review the new channel maps in detail. But everything else seems sensible to me. Do you have tools to verify the new channel map? E.g. Angela at some point produced edepsim files that should deposit some charge exactly in front of the SiPMs to verify the mapping.

@diaza
Copy link
Member Author

diaza commented Nov 11, 2025

@diaza I did not review the new channel maps in detail. But everything else seems sensible to me. Do you have tools to verify the new channel map? E.g. Angela at some point produced edepsim files that should deposit some charge exactly in front of the SiPMs to verify the mapping.

If @Angela-White has that ready to send, that would be great! Otherwise I can try to create my own, I've done something similar for 2x2

@diaza
Copy link
Member Author

diaza commented Nov 12, 2025

@liviocali
I've attached two gifs, showing how the light deposition changes as a function of charge deposition position in the FSD. The first shows for the existing code, the other for my modifications. You can see that the depositions in the second gif look more sensible.
EDIT: Replacing with better gifs.
develop_fsd
feature_fsd

@diaza
Copy link
Member Author

diaza commented Nov 13, 2025

For good measure, I'm showing below two gifs with a similar comparison as above, but in the 2x2. This comparisons should show that the modifications made to larndsim, the LUT, and the op channel mapping in 2x2 result in the same output. The top gif is for the existing code, and the second gif is for the updated.
develop_2x2
feature_2x2

Copy link
Collaborator

@cuddandr cuddandr left a comment

Choose a reason for hiding this comment

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

The GIFs are enough validation for me. Everything looks good to me.

@diaza diaza merged commit 53b08ca into develop Nov 14, 2025
@diaza diaza deleted the feature_flip_LUT branch November 14, 2025 08:08
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.

4 participants