From 9be44fd87bef9f9e8e9d838332e2f6acc6f9ed70 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Fri, 1 Mar 2024 10:11:30 +0100 Subject: [PATCH] Symptom-treatment for https://github.com/McStasMcXtrace/McCode/issues/1578 BUT: Issue needs real work, e.g. cross-checking uservars against inputs... --- .../AstroX_ESA/ATHENA_1mm/ATHENA_1mm.instr | 30 +++++++------- .../ATHENA_1pore/ATHENA_1pore.instr | 30 +++++++------- .../ATHENA_cfgA_1mm/ATHENA_cfgA_1mm.instr | 38 +++++++++--------- .../ATHENA_cfgA_1mm_FEMd.instr | 40 +++++++++---------- 4 files changed, 71 insertions(+), 67 deletions(-) diff --git a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1mm/ATHENA_1mm.instr b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1mm/ATHENA_1mm.instr index 35eb7b247e..6336e7fed8 100644 --- a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1mm/ATHENA_1mm.instr +++ b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1mm/ATHENA_1mm.instr @@ -44,17 +44,17 @@ * Example: ATHENA_1mm.instr porenumber=3 * * %Parameters -* FL [m] The focal length of the optical system -* optics_dist [m] The distance between souce and optic. In space this would be quite large :-). -* SRC_POS_X [m] Displacement of source along X -* SRC_POS_Y [m] Displacement of source along Y -* offaxis_angle [arcmin] Angle of collimated light from source -* reflectivity [ ] Data file containing reflectivities (such as from IMD) -* E0 [keV] Central energy of X-rays -* dE [keV] Half spread of energy spectrum to be emitted from source -* porenumber [ ] Actually the mirror module number. -* positionfile [ ] File containing the pore/mirror module positions. -* geomfile [ ] File which contains the geometry of the pores (i.e. radii,lengths) +* FL: [m] The focal length of the optical system +* optics_dist: [m] The distance between souce and optic. In space this would be quite large :-). +* SRC_POS_X: [m] Displacement of source along X +* SRC_POS_Y: [m] Displacement of source along Y +* offaxis_angle: [arcmin] Angle of collimated light from source +* reflectivity: [ ] Data file containing reflectivities (such as from IMD) +* E0: [keV] Central energy of X-rays +* dE: [keV] Half spread of energy spectrum to be emitted from source +* porenumber: [ ] Actually the mirror module number. +* positionfile: [ ] File containing the pore/mirror module positions. +* geomfile: [ ] File which contains the geometry of the pores (i.e. radii,lengths) * dPx: [m] Offset/displacement of parabolic pore along x from its theoretical position. * dPy: [m] Offset/displacement of parabolic pore along y from its theoretical position. * dPz: [m] Offset/displacement of parabolic pore along z from its theoretical position. @@ -67,6 +67,8 @@ * dHrx: [arcsec] Rotational misalignment of hyperbolic pore around x. * dHry: [arcsec] Rotational misalignment of hyperbolic pore around y. * dHrz: [arcsec] Rotational misalignment of hyperbolic pore around z. +* Hyper: [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. +* Para: [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. * * %Link * The ATHENA web pages @ ESA @@ -81,7 +83,7 @@ DEFINE INSTRUMENT ATHENA_1mm(FL=12, optics_dist=10, dHx=0,dHy=0,dHz=0, dHrx=0, dHry=0, dHrz=0, string reflectivity="mirror_coating_unity.txt", E0=5, dE=0.001, int porenumber=1,string ringfile="ref_design_breaks.txt", - string positionfile="ATHENA_mm_1petal.dat", string geomfile="ATHENA_rings_1_20.dat", int hyper=1, int para=1) + string positionfile="ATHENA_mm_1petal.dat", string geomfile="ATHENA_rings_1_20.dat", int Hyper=1, int Para=1) DEPENDENCY "-DDATPATH=GETPATH(data/)" /* The DECLARE section allows us to declare variables or small */ @@ -231,7 +233,7 @@ AT( 0,-PRM[ROW[porenumber-1]-1],0) RELATIVE misalign_rot_p COMPONENT mm_p_1 = MM_p( pore_th=0, ring_nr=ROW[porenumber-1], Z0=FL, pore_width=pore_width , pore_height=pore_height, mirror_reflec=reflectivity, R_d=0, size_file=ringfile) -WHEN(para) AT(0,0,0) RELATIVE ref_p +WHEN(Para) AT(0,0,0) RELATIVE ref_p ROTATED (0.0,0.0,0.0) RELATIVE ref_p EXTEND %{ @@ -250,7 +252,7 @@ AT( 0,-PRM[ROW[porenumber-1]-1],0) RELATIVE misalign_rot_h COMPONENT mm_h_1 = MM_h( pore_th=0, ring_nr=ROW[porenumber-1], Z0=FL, pore_width=pore_width, pore_height=pore_height, mirror_reflec=reflectivity, R_d=0, size_file=ringfile) -WHEN (hyper) AT(0,0,0) RELATIVE ref_h +WHEN (Hyper) AT(0,0,0) RELATIVE ref_h ROTATED (0.0,0.0,0.0) RELATIVE ref_h EXTEND %{ diff --git a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1pore/ATHENA_1pore.instr b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1pore/ATHENA_1pore.instr index 59f3aef2db..5accab3837 100644 --- a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1pore/ATHENA_1pore.instr +++ b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_1pore/ATHENA_1pore.instr @@ -45,17 +45,17 @@ * Example: ATHENA_1pore.instr porenumber=3 * * %Parameters -* FL [m] The focal length of the optical system -* optics_dist [m] The distance between souce and optic. In space this would be quite large :-). -* SRC_POS_X [m] Displacement of source along X -* SRC_POS_Y [m] Displacement of source along Y -* offaxis_angle [arcmin] Angle of collimated light from source -* reflectivity [ ] Data file containing reflectivities (such as from IMD) -* E0 [keV] Central energy of X-rays -* dE [keV] Half spread of energy spectrum to be emitted from source -* porenumber [ ] Actually the mirror module number. -* positionfile [ ] File containing the pore/mirror module positions. -* geomfile [ ] File which contains the geometry of the pores (i.e. radii,lengths) +* FL: [m] The focal length of the optical system +* optics_dist: [m] The distance between souce and optic. In space this would be quite large :-). +* SRC_POS_X: [m] Displacement of source along X +* SRC_POS_Y: [m] Displacement of source along Y +* offaxis_angle: [arcmin] Angle of collimated light from source +* reflectivity: [ ] Data file containing reflectivities (such as from IMD) +* E0: [keV] Central energy of X-rays +* dE: [keV] Half spread of energy spectrum to be emitted from source +* porenumber: [ ] Actually the mirror module number. +* positionfile: [ ] File containing the pore/mirror module positions. +* geomfile: [ ] File which contains the geometry of the pores (i.e. radii,lengths) * dPx: [m] Offset/displacement of parabolic pore along x from its theoretical position. * dPy: [m] Offset/displacement of parabolic pore along y from its theoretical position. * dPz: [m] Offset/displacement of parabolic pore along z from its theoretical position. @@ -68,6 +68,8 @@ * dHrx: [arcsec] Rotational misalignment of hyperbolic pore around x. * dHry: [arcsec] Rotational misalignment of hyperbolic pore around y. * dHrz: [arcsec] Rotational misalignment of hyperbolic pore around z. +* Hyper: [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. +* Para: [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. * * %Link * The ATHENA web pages @ ESA @@ -82,7 +84,7 @@ DEFINE INSTRUMENT ATHENA_1pore(FL=12, optics_dist=10, dHx=0,dHy=0,dHz=0, dHrx=0, dHry=0, dHrz=0, string reflectivity="mirror_coating_unity.txt", E0=5, dE=0.001, int porenumber=1, - string positionfile="ATHENA_mm_1petal.dat", string geomfile="ATHENA_rings_1_20.dat", int hyper=1, int para=1) + string positionfile="ATHENA_mm_1petal.dat", string geomfile="ATHENA_rings_1_20.dat", int Hyper=1, int Para=1) DEPENDENCY "-DDATPATH=GETPATH(data/)" /* The DECLARE section allows us to declare variables or small */ @@ -226,7 +228,7 @@ ROTATED (0,0,-90+PA[porenumber-1]) RELATIVE optics_centre COMPONENT Pore_p_1 = Pore_p( radius_p=PRP[ROW[porenumber-1]-1], radius_m=PRM[ROW[porenumber-1]-1], zdepth=PRL[ROW[porenumber-1]-1], Z0=FL, xwidth=pore_width, yheight=pore_height, mirror_reflec=reflectivity, R_d=0) -WHEN(para) AT(dPx,dPy+PRM[ROW[porenumber-1]-1],dPz) RELATIVE a_1 +WHEN(Para) AT(dPx,dPy+PRM[ROW[porenumber-1]-1],dPz) RELATIVE a_1 ROTATED (dPrx/3600.0,dPry/3600.0,dPrz/3600.0) RELATIVE a_1 EXTEND %{ @@ -243,7 +245,7 @@ AT(0,0,0) RELATIVE optics_centre COMPONENT Pore_h_1 = Pore_h( radius_m=PRM[ROW[porenumber-1]-1], radius_h=PRH[ROW[porenumber-1]-1], zdepth=PRL[ROW[porenumber-1]-1], Z0=FL, xwidth=pore_width, yheight=pore_height, mirror_reflec=reflectivity, R_d=0) -WHEN (hyper) AT(dHx,dHy+PRM[ROW[porenumber-1]-1],dHz) RELATIVE a_1 +WHEN (Hyper) AT(dHx,dHy+PRM[ROW[porenumber-1]-1],dHz) RELATIVE a_1 ROTATED (dHrx/3600.0,dHry/3600.0,dHrz/3600.0) RELATIVE a_1 EXTEND %{ diff --git a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm/ATHENA_cfgA_1mm.instr b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm/ATHENA_cfgA_1mm.instr index b698c33426..87c470dee2 100644 --- a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm/ATHENA_cfgA_1mm.instr +++ b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm/ATHENA_cfgA_1mm.instr @@ -33,15 +33,15 @@ * Example: ATHENA_cfgA_1mm.instr porenumber=3 * * %Parameters -* FL [m] The focal length of the optical system -* optics_dist [m] The distance between souce and optic. In space this would be quite large :-). -* offaxis_angle [arcmin] Angle of collimated light from source -* reflectivity [ ] Data file containing reflectivities (such as from IMD) -* E0 [keV] Central energy of X-rays -* dE [keV] Half spread of energy spectrum to be emitted from source -* mmdef_file [ ] File containing the positions and overall geometry of Mirror Modules. -* ringfile [ ] File which contains deatiled plate descriptions. -* porenumber [ ] Actually the mirror module number. +* FL: [m] The focal length of the optical system +* optics_dist: [m] The distance between souce and optic. In space this would be quite large :-). +* offaxis_angle: [arcmin] Angle of collimated light from source +* reflectivity: [ ] Data file containing reflectivities (such as from IMD) +* E0: [keV] Central energy of X-rays +* dE: [keV] Half spread of energy spectrum to be emitted from source +* mmdef_file: [ ] File containing the positions and overall geometry of Mirror Modules. +* ringfile: [ ] File which contains deatiled plate descriptions. +* porenumber: [ ] Actually the mirror module number. * dPx: [m] Offset/displacement of parabolic pore along x from its theoretical position. * dPy: [m] Offset/displacement of parabolic pore along y from its theoretical position. * dPz: [m] Offset/displacement of parabolic pore along z from its theoretical position. @@ -54,13 +54,13 @@ * dHrx: [arcsec] Rotational misalignment of hyperbolic pore around x. * dHry: [arcsec] Rotational misalignment of hyperbolic pore around y. * dHrz: [arcsec] Rotational misalignment of hyperbolic pore around z. -* XWidth [m] The width of the user detector default is that of the ATHENA WFI large area detector -* YHeight [m] The height of the user detector default is that of the ATHENA WFI large area detector -* NX [ ] Number of pixels along X in the user detector -* NY [ ] Number of pixels along Y in the user detector. -* hyper [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. -* para [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. -* lists [ ] If non-zero drop event mode monitr are active. Turn-off to save disk-space. +* XWidth: [m] The width of the user detector default is that of the ATHENA WFI large area detector +* YHeight: [m] The height of the user detector default is that of the ATHENA WFI large area detector +* NX: [ ] Number of pixels along X in the user detector +* NY: [ ] Number of pixels along Y in the user detector. +* Hyper: [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. +* Para: [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. +* lists: [ ] If non-zero drop event mode monitr are active. Turn-off to save disk-space. * * %Link * The ATHENA web pages @ ESA @@ -77,7 +77,7 @@ DEFINE INSTRUMENT ATHENA_1mm(FL=12, optics_dist=10, string reflectivity="mirror_coating_unity.txt",default_reflec=0, E0=5, dE=0.001, int porenumber=1, string mmdef_file="MM_Definitions-cfgA.csv", string ringfile="ref_design_breaks.txt", - int hyper=1, int para=1, int lists=0) + int Hyper=1, int Para=1, int lists=0) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ @@ -199,7 +199,7 @@ AT( 0,-PR,0) RELATIVE misalign_rot_p COMPONENT mm_p_1 = MM_p( pore_th=0, ring_nr=row, Z0=FL, pore_width=pore_width , pore_height=pore_height, chamfer_width=pore_wall, mirror_reflec=reflectivity, R_d=default_reflec, size_file=ringfile) -WHEN(para) AT(0,0,0) RELATIVE ref_p +WHEN(Para) AT(0,0,0) RELATIVE ref_p ROTATED (0.0,0.0,0.0) RELATIVE ref_p EXTEND %{ @@ -224,7 +224,7 @@ AT( 0,-PR,0) RELATIVE misalign_rot_h COMPONENT mm_h_1 = MM_h( pore_th=0, ring_nr=row, Z0=FL, pore_width=pore_width, pore_height=pore_height, chamfer_width=pore_wall, mirror_reflec=reflectivity, R_d=default_reflec, size_file=ringfile) -WHEN (hyper) AT(0,0,0) RELATIVE ref_h +WHEN (Hyper) AT(0,0,0) RELATIVE ref_h ROTATED (0.0,0.0,0.0) RELATIVE ref_h EXTEND %{ diff --git a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm_FEMd/ATHENA_cfgA_1mm_FEMd.instr b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm_FEMd/ATHENA_cfgA_1mm_FEMd.instr index 325a6fc90b..aaca7c5997 100644 --- a/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm_FEMd/ATHENA_cfgA_1mm_FEMd.instr +++ b/mcxtrace-comps/examples/AstroX_ESA/ATHENA_cfgA_1mm_FEMd/ATHENA_cfgA_1mm_FEMd.instr @@ -34,16 +34,16 @@ * Example: ATHENA_cfgA_1mm_FEMd.instr porenumber=3 * * %Parameters -* FL [m] The focal length of the optical system -* optics_dist [m] The distance between souce and optic. In space this would be quite large :-). -* offaxis_angle [arcmin] Angle of collimated light from source -* reflectivity [ ] Data file containing reflectivities (such as from IMD) -* E0 [keV] Central energy of X-rays -* dE [keV] Half spread of energy spectrum to be emitted from source -* mmdef_file [ ] File containing the positions and overall geometry of Mirror Modules. -* ringfile [ ] File which contains deatiled plate descriptions. -* disp_file [ ] Fiel that conatins mirror module displacements -* porenumber [ ] Actually the mirror module number. +* FL: [m] The focal length of the optical system +* optics_dist: [m] The distance between souce and optic. In space this would be quite large :-). +* offaxis_angle: [arcmin] Angle of collimated light from source +* reflectivity: [ ] Data file containing reflectivities (such as from IMD) +* E0: [keV] Central energy of X-rays +* dE: [keV] Half spread of energy spectrum to be emitted from source +* mmdef_file: [ ] File containing the positions and overall geometry of Mirror Modules. +* ringfile: [ ] File which contains deatiled plate descriptions. +* disp_file: [ ] Fiel that conatins mirror module displacements +* porenumber: [ ] Actually the mirror module number. * dPx: [m] Offset/displacement of parabolic pore along x from its theoretical position. * dPy: [m] Offset/displacement of parabolic pore along y from its theoretical position. * dPz: [m] Offset/displacement of parabolic pore along z from its theoretical position. @@ -56,13 +56,13 @@ * dHrx: [arcsec] Rotational misalignment of hyperbolic pore around x. * dHry: [arcsec] Rotational misalignment of hyperbolic pore around y. * dHrz: [arcsec] Rotational misalignment of hyperbolic pore around z. -* XWidth [m] The width of the user detector default is that of the ATHENA WFI large area detector -* YHeight [m] The height of the user detector default is that of the ATHENA WFI large area detector -* NX [ ] Number of pixels along X in the user detector -* NY [ ] Number of pixels along Y in the user detector. -* hyper [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. -* para [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. -* lists [ ] If non-zero drop event mode monitr are active. Turn-off to save disk-space. +* XWidth: [m] The width of the user detector default is that of the ATHENA WFI large area detector +* YHeight: [m] The height of the user detector default is that of the ATHENA WFI large area detector +* NX: [ ] Number of pixels along X in the user detector +* NY: [ ] Number of pixels along Y in the user detector. +* Hyper: [ ] If non-zero the secondary mirror (hyperbolic) is active. Useful for debugging. +* Para: [ ] If non-zero the primary mirror is acive (parabolic) is active. Useful for debugging. +* lists: [ ] If non-zero drop event mode monitr are active. Turn-off to save disk-space. * * %Link * The ATHENA web pages @ ESA @@ -80,7 +80,7 @@ DEFINE INSTRUMENT ATHENA_cfgA_1mm_FEMd(FL=12, optics_dist=10, E0=5, dE=0.001, int porenumber=1, string mmdef_file="MM_Definitions-cfgA.csv", string ringfile="ref_design_breaks.txt", string disp_file="none",int disp_type=0, - int hyper=1, int para=1, int lists=0) + int Hyper=1, int Para=1, int lists=0) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ @@ -224,7 +224,7 @@ AT( 0,-PR,0) RELATIVE misalign_rot_p COMPONENT mm_p_1 = MM_p( pore_th=0, ring_nr=row, Z0=FL, pore_width=pore_width , pore_height=pore_height, chamfer_width=pore_wall, mirror_reflec=reflectivity, R_d=default_reflec, size_file=ringfile) -WHEN(para) AT(0,0,0) RELATIVE ref_p +WHEN(Para) AT(0,0,0) RELATIVE ref_p ROTATED (0.0,0.0,0.0) RELATIVE ref_p EXTEND %{ @@ -249,7 +249,7 @@ AT( 0,-PR,0) RELATIVE misalign_rot_h COMPONENT mm_h_1 = MM_h( pore_th=0, ring_nr=row, Z0=FL, pore_width=pore_width, pore_height=pore_height, chamfer_width=pore_wall, mirror_reflec=reflectivity, R_d=default_reflec, size_file=ringfile) -WHEN (hyper) AT(0,0,0) RELATIVE ref_h +WHEN (Hyper) AT(0,0,0) RELATIVE ref_h ROTATED (0.0,0.0,0.0) RELATIVE ref_h EXTEND %{