source icon indicating copy to clipboard operation
source copied to clipboard

Help needed on multiple camera with different positions/sightlines

Open louloufev opened this issue 1 month ago • 3 comments

Hello,

I am working with a large number of spectrometers, and I wanted to use raytracing to map out what they see with added reflections on the wall (coming from the Cherab package). My initial idea was to use the PinholeCamera object to model each line of sights, and create camera of 1 pixel, since each line of sight has a different origin and direction. However the program does not accept PinholeCamera of 1 pixel. Why does the PinholeCamera needs more than 1 pixels ? Should I use another object to model my lines of sight and generate the raytracing ?

Thanks for the help,

Louis

louloufev avatar Nov 10 '25 11:11 louloufev

You could use the VectorCamera, and give it an of shape [1, nlos] of pixel locations and LOS vectors, one for each pixel in your proposed setup.

Note that VectorCamera is a 2D observer but can be used for unstructured observations by expanding a list of point-observers to a 2D array in the way above.

jacklovell avatar Nov 10 '25 11:11 jacklovell

Thanks for the tip ! Is it possible to give a field of view with a VectorCamera ? My detectors don't see along a single line but they have a field of view.

louloufev avatar Nov 10 '25 13:11 louloufev

Hmm, I don't think you can directly specify a FOV with the VectorCamera. Maybe then a FibreOptic would be better, where you specify the acceptance angle. Or a TagetedPixel (sadly no web documentation for this one) where you manually put a target in front of the pixel of appropriate solid angle to give the FOV you need, but this isn't as simple as the PinholeCamera observer.

jacklovell avatar Nov 10 '25 16:11 jacklovell