ecpi.simu.lib.ray_tracing module

Section author: ECLAIRs GP team

ECLAIRs ray tracing simulation method

Summary

Classes:

SimuECLAIRsRayTracing

Ray tracing simulation for ECLAIRs

SimuInstruXRayTracing

old class

Class diagram:

Functions:

ray_tracing_for_one_src_numba

compute shadowgram count with ray tracing method with photon position on detector

ray_tracing_photon_list_numba

compute shadowgram count with ray tracing method with photon position on detector

summation_loop_for_ray_tracing

compute shadowgram count with ray tracing method with index position of photon on mask

Reference

class SimuECLAIRsRayTracing(catalog_x: Optional[ecpi.common.sky.catalog.CatalogFovBasic] = None, nb_pixel=None)[source]

Bases: ecpi.simu.lib.ray_tracing.SimuInstruXRayTracing

Ray tracing simulation for ECLAIRs

Essentially loop on sub-mask

simu_catalog(time_expose, verbose=None, show=None)[source]
class SimuInstruXRayTracing(instru_x: ecpi.common.instru.model_geom.InstruXbase, catalog_x: Optional[ecpi.common.sky.catalog.CatalogFovBasic] = None)[source]

Bases: ecpi.simu.lib.instru_x.SimuInstruXBase

old class

..warning simulation instru X with

  • catalog FOV => stable pointing

  • evt in pixel => no energy

  • CXB model uniforme noise on detector

ray_tracing_for_one_src(apos)[source]

result: select by ray tracing photon can be arrived on detector by hole mask

ray_tracing_for_one_src_numpy(apos)[source]

result: select by ray tracing photon can be arrived on detector by hole mask

simu_catalog(time_expose, verbose=None)[source]
ray_tracing_for_one_src_numba(shadow, mask, apos, vec_trans_source, size_p_mask, size_p_det, lbpos_mask, lbpos_det)[source]

compute shadowgram count with ray tracing method with photon position on detector

full computation with numba, ie compute index position instead call array_square_cell method

Parameters
  • shadow (2D array) – {out} shadowgram with count

  • mask (2D array) –

  • apos ([cm] 2D array (n,2)) – photon position on detector

  • vec_trans_source (1D array (2,)) – translation vector of the source

  • size_p_mask ([cm] real) – size of pixel mask

  • size_p_det ([cm] real) – size of pixel detector

  • lbpos_mask ([cm] 1D array (2,)) – position of left bottom corner position of mask

  • lbpos_det ([cm] 1D array (2,)) – position of left bottom corner position of detector

Returns

index of the photon on detector

Return type

[int] 2D array (n,2)

ray_tracing_photon_list_numba(on_detect, mask, apos, vec_trans_source, size_p_mask, lbpos_mask)[source]

compute shadowgram count with ray tracing method with photon position on detector

full computation with numba, ie compute index position instead call array_square_cell method

Parameters
  • shadow (2D array) – {out} shadowgram with count

  • mask (2D array) –

  • apos ([cm] 2D array (n,2)) – photon position on detector

  • vec_trans_source (1D array (2,)) – translation vector of the source

  • size_p_mask ([cm] real) – size of pixel mask

  • lbpos_mask ([cm] 1D array (2,)) – position of left bottom corner position of mask

Returns

index of the photon on detector

Return type

[int] 2D array (n,2)

summation_loop_for_ray_tracing(row, col, aval_mask, shadow)[source]

compute shadowgram count with ray tracing method with index position of photon on mask

summation of the photons that have passed through the mask

Parameters
  • row ([int] 1D array (n,)) – row index of the mask where the photon arrives

  • col ([int] 1D array (n,)) – row index of the mask where the photon arrives

  • aval_mask ([0,1] 2D array) – pixel mask value (1 is open)

  • shadow ([int] 2D array) – photon count on pixel detector