ecpi.common.instru.solid_angle module
Section author: ECLAIRs GP team
Solid angle (with cos theta) of ECLAIRs
Summary
Classes:
Solid angle computation for the ECLAIRs instrument in the presence of Earth in the FOV. |
|
Solid angle computation for the ECLAIRs instrument in the presence of Earth in the FOV. |
|
Solid angle computation for the ECLAIRs instrument. |
|
Singleton SolidAngle class, call solid angle by hole one time |
Class diagram:
Functions:
..warning: for diagnostic purposes |
|
Loop over detector-mask pixels so as to effectively compute the solid angle in presence of Earth in FOV. |
|
Loop over detector and all submask. ..note: by Colley JM, optimization of _run_over_detector_mask_pixels_with_earth_numba, * used precomputing of solid angle of each pixel det-mask, it s a constant of the system * include all submask * earth presence: test on cos angle not angle directly (remove arccos) * => ratio time ~ 10. |
Reference
- class SolidAngle(instru_ecl: ecpi.common.instru.model_geom.InstruECLAIRs, fully_opened_mask=False)[source]
Bases:
ecpi.common.instru.solid_angle.SolidAngleComputationWithoutEarthSolid angle computation for the ECLAIRs instrument in the presence of Earth in the FOV.
- run_calculator(limb_angle, u_earth, fully_opened_mask=False, debug=False)[source]
Compute solid angle map with the Earth in the FOV using the mean CXB shape calculation.
..note: when angle(vec direction, vec Earth) very close to limb angle may lead to numerical errors in comparsion. introduced a bias in solid angle computation. Check has been added that raises a warning.
- Parameters
limb_angle (float) – limb angle (cf. doc) in degree
u_earth ([float, float, float]) – unit vector pointing towards Earth center
fully_opened_mask – whether or not to consider the opened mask.
The ECLAIRs maks cross remains ! :type fully_opened_mask: bool :return: solid angle map :rtype: 2D array(float) with shape 80x80
- class SolidAngleComputationWithEarth(instru_ecl: ecpi.common.instru.model_geom.InstruECLAIRs, use_numba=False)[source]
Bases:
ecpi.common.instru.solid_angle.SolidAngleComputationWithoutEarthSolid angle computation for the ECLAIRs instrument in the presence of Earth in the FOV.
- run_calculator(limb_angle, u_earth, fully_opened_mask=False, debug=False)[source]
Compute solid angle map with the Earth in the FOV using the mean CXB shape calculation.
..note: when angle(vec direction, vec Earth) very close to limb angle may lead to numerical errors in comparsion. introduced a bias in solid angle computation. Check has been added that raises a warning.
- Parameters
limb_angle (float) – limb angle (cf. doc) in degree
u_earth ([float, float, float]) – unit vector pointing towards Earth center
fully_opened_mask – whether or not to consider the opened mask.
The ECLAIRs maks cross remains ! :type fully_opened_mask: bool :return: solid angle map :rtype: 2D array(float) with shape 80x80
- class SolidAngleComputationWithoutEarth(instru_ecl: ecpi.common.instru.model_geom.InstruECLAIRs, use_numba=False)[source]
Bases:
objectSolid angle computation for the ECLAIRs instrument.
- run_calculator(fully_opened_mask=False, debug=False)[source]
Compute solid angle map without the Earth in the FOV.
documentation: * simulation_correction_cxb_earth_15_05_2020_v2_alg.pdf (version 2) p.10->11 * simulation_correction_pipeline_cxb_earth_15_05_2020_v2_pb.pdf (version 2) p.4
- Parameters
fully_opened_mask – whether or not to consider the opened mask.
The ECLAIRs mask cross remains ! Default is False. :type fully_opened_mask: bool :return: solid angle map :rtype: 2D array(float) with shape 80x80
..note: the computation includes the cos theta effect. It follows the sum of the solid angle is 2199.0922 instead of 2452.0531 (without cos theta case).
- set_mask_configuration(sub_mask_arr, fully_opened_mask)[source]
Sets the mask configuration: whether or not to compute solid angle with the real mask geometry or with open submasks.
- Parameters
sub_mask_arr (2D array(int) Filled with 0s and 1s.) – array specifying submask geometry
fully_opened_mask – whether or not to consider the opened mask.
The ECLAIRs maks cross remains ! :type fully_opened_mask: bool
- class SolidAngleSingleton(*args, **kargs)[source]
Bases:
ecpi.common.instru.solid_angle.SolidAngleSingleton SolidAngle class, call solid angle by hole one time
- instance = None
- solid_angle_for_mask_hole_numba(l_detpix, l_submaskpos, detpix, pixpitch, detmas, maspsize, detpsize)[source]
Loop over detector-mask pixels so as to effectively compute the solid angle in presence of Earth in FOV. Python/C implementation (numba).
..warning: seems upgrading to numba==0.48.XXX could cure use of linalg.norm and cos. TBC
- solid_angle_with_earth_numba(l_detpix, l_submaskpos, detpix, pixpitch, detmas, maspsize, detpsize, limb, u_earth, l_sabhm)[source]
Loop over detector and all submask. ..note: by Colley JM, optimization of _run_over_detector_mask_pixels_with_earth_numba,
used precomputing of solid angle of each pixel det-mask, it s a constant of the system
include all submask
earth presence: test on cos angle not angle directly (remove arccos)
=> ratio time ~ 10