diff --git a/instrument/LET_Parameters.xml b/instrument/LET_Parameters.xml index 229217281a13df47c75ef1c78878e36bfd13d214..20d84b6e70e3b3b1b255b0b16d34201cb8b94854 100644 --- a/instrument/LET_Parameters.xml +++ b/instrument/LET_Parameters.xml @@ -414,17 +414,39 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/LET_Parameters_dr1to12.xml b/instrument/LET_Parameters_dr1to12.xml index 7dc8b5fa8b6a0429ad2879ad1c4327c118a7bc00..3d5cc9e46f6091b14562ba35ecd9929e31ac4d9e 100644 --- a/instrument/LET_Parameters_dr1to12.xml +++ b/instrument/LET_Parameters_dr1to12.xml @@ -414,18 +414,40 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/LET_Parameters_dr2to12.xml b/instrument/LET_Parameters_dr2to12.xml index b1907b5869f18bb7824c8a24c58cda21270c9211..e6d167f8ba76b2414896d506da5e91cf5bd6e267 100644 --- a/instrument/LET_Parameters_dr2to12.xml +++ b/instrument/LET_Parameters_dr2to12.xml @@ -414,18 +414,40 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/LET_Parameters_dr2to9.xml b/instrument/LET_Parameters_dr2to9.xml index 58c8e9bf70e0167ccd3b8095a26e5aed5aedc52a..fec0e1c8de150da5dca7252646a4be52da4f6f31 100644 --- a/instrument/LET_Parameters_dr2to9.xml +++ b/instrument/LET_Parameters_dr2to9.xml @@ -414,18 +414,40 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/LET_Parameters_dr3to10.xml b/instrument/LET_Parameters_dr3to10.xml index 256fe193272545719da00adcd985617bb08baa5e..95e300c5fbfbb7f6931af87d8f69de0d8cb21034 100644 --- a/instrument/LET_Parameters_dr3to10.xml +++ b/instrument/LET_Parameters_dr3to10.xml @@ -414,17 +414,39 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, diff --git a/instrument/LET_Parameters_dr3to11.xml b/instrument/LET_Parameters_dr3to11.xml index c46297bf739324d3e8269370ad57503c1c243b01..c71403135d944a36174b8b7e10cc662f50405155 100644 --- a/instrument/LET_Parameters_dr3to11.xml +++ b/instrument/LET_Parameters_dr3to11.xml @@ -414,18 +414,40 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) --> <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/MAPS_Parameters.xml b/instrument/MAPS_Parameters.xml index 5073515875c584f77c314982be0b05eaa683b8b8..adddcee538fdf12e7a35eb00795df2aa6fa0cee1 100644 --- a/instrument/MAPS_Parameters.xml +++ b/instrument/MAPS_Parameters.xml @@ -429,18 +429,19 @@ <parameter name="motor_offset"> <value val="None"/> </parameter> + <parameter name="correct_absorption_on" type="string"> <value val="None"/> <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. - These shapes are Cylinder, Plate, AnnularRing and other defined in the AbsorptionShapes module within the direct inelastic + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic reduction scripts folder"/> </parameter> <parameter name="abs_corr_info" type="string"> <value val="None"/> <description is="The property describes the type of the absorption corrections to run and, if necessary, additional properties of the absorption algorithm to use. The acceptable types are: - is_mc:True (for monte-carlo corrections) + is_mc:True (for Monte-Carlo corrections) is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. The property sting may have a form: is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm diff --git a/instrument/MAPS_Parameters_2017_06_02.xml b/instrument/MAPS_Parameters_2017_06_02.xml index 407c7822b7637e43886b674cbd4b1f558e9d8e8b..a5835a99a0438018e0106f22f17f69e26a499fae 100644 --- a/instrument/MAPS_Parameters_2017_06_02.xml +++ b/instrument/MAPS_Parameters_2017_06_02.xml @@ -434,14 +434,14 @@ <value val="None"/> <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. - These shapes are Cylinder, Plate, AnnularRing and other defined in the AbsorptionShapes module within the direct inelastic + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic reduction scripts folder"/> </parameter> <parameter name="abs_corr_info" type="string"> <value val="None"/> <description is="The property describes the type of the absorption corrections to run and, if necessary, additional properties of the absorption algorithm to use. The acceptable types are: - is_mc:True (for monte-carlo corrections) + is_mc:True (for Monte-Carlo corrections) is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. The property sting may have a form: is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm diff --git a/instrument/MARI_Parameters.xml b/instrument/MARI_Parameters.xml index 9d92d648fb7194865be41a7b8878dc55907a1c54..82f403756fadaa898d021275280a01ebbc08a934 100644 --- a/instrument/MARI_Parameters.xml +++ b/instrument/MARI_Parameters.xml @@ -437,14 +437,14 @@ <value val="None"/> <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. - These shapes are Cylinder, Plate, AnnularRing and other defined in the AbsorptionShapes module within the direct inelastic + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic reduction scripts folder"/> </parameter> <parameter name="abs_corr_info" type="string"> <value val="None"/> <description is="The property describes the type of the absorption corrections to run and, if necessary, additional properties of the absorption algorithm to use. The acceptable types are: - is_mc:True (for monte-carlo corrections) + is_mc:True (for Monte-Carlo corrections) is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. The property sting may have a form: is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm @@ -454,7 +454,6 @@ "/> </parameter> - <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/MARI_Parameters_19900101_20160911.xml b/instrument/MARI_Parameters_19900101_20160911.xml index 1162fdd091ea9980a26aff0e3b4216e9d12f24ed..69ab01f104c1445dd322a64e9c495a85d0974954 100644 --- a/instrument/MARI_Parameters_19900101_20160911.xml +++ b/instrument/MARI_Parameters_19900101_20160911.xml @@ -415,18 +415,39 @@ <value val="False"/> </parameter> -<!-- The semicolon separated list of possible log names, containing information on crystl rotation. - First found log will be used togethere with motor_offset to identify crystal rotation +<!-- The semicolon separated list of possible log names, containing information on crystal rotation. + First found log will be used together with motor_offset to identify crystal rotation (psi in Horace) MARI of course not uses it and probably not writes such log, but - it is goot to have it here for testing purtposes --> + it is goot to have it here for testing purposes --> <parameter name="motor_log_names" type="string"> <value val="wccr;Rot"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, diff --git a/instrument/MERLIN_Parameters.xml b/instrument/MERLIN_Parameters.xml index 88bdbdc9deb9d4998ac1dc70eae58f000471b206..01ada8da0df3d0da80da2121b2217e326168b9df 100644 --- a/instrument/MERLIN_Parameters.xml +++ b/instrument/MERLIN_Parameters.xml @@ -425,6 +425,26 @@ <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, diff --git a/instrument/MERLIN_Parameters_2017_02.xml b/instrument/MERLIN_Parameters_2017_02.xml index 391803ba18a83613da8a359f2f34769880ac8932..95c01ca983bbfe1ea12a9f077dc11df375506149 100644 --- a/instrument/MERLIN_Parameters_2017_02.xml +++ b/instrument/MERLIN_Parameters_2017_02.xml @@ -425,6 +425,26 @@ <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, diff --git a/instrument/MERLIN_Parameters_2018_03.xml b/instrument/MERLIN_Parameters_2018_03.xml index 8ae55cbec86913160257fc38f556d76d6d3b2cf9..b6695e7669aec2726b1c56393f4dbe39fdcb98e4 100644 --- a/instrument/MERLIN_Parameters_2018_03.xml +++ b/instrument/MERLIN_Parameters_2018_03.xml @@ -426,6 +426,28 @@ </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/instrument/MERLIN_Parameters_after2013_4.xml b/instrument/MERLIN_Parameters_after2013_4.xml index 3a47b550dcef5803c01630ba1964c22e4d916c05..03288ba80f25db9468510a479cad4753de6a7c9e 100644 --- a/instrument/MERLIN_Parameters_after2013_4.xml +++ b/instrument/MERLIN_Parameters_after2013_4.xml @@ -420,12 +420,34 @@ <parameter name="motor_log_names" type="string"> <value val="CCR_ROT;wccr"/> </parameter> -<!-- Initial value used to identify crytsal rotation angle psi=motor_offset+wccr.timeAverageValue() --> +<!-- Initial value used to identify crystal rotation angle psi=motor_offset+wccr.timeAverageValue() --> <parameter name="motor_offset"> <value val="None"/> </parameter> +<parameter name="correct_absorption_on" type="string"> + <value val="None"/> + <description is="If defined, the property would initiate the run of the absorption corrections procedure, specific for the measured sample. + The corrections themselves are controlled by one of the absorption shapes classes, defined for Direct inelastic reduction. + These shapes are Cylinder, Plate, HollowCylinder and other defined in the AbsorptionShapes module within the direct inelastic + reduction scripts folder"/> +</parameter> +<parameter name="abs_corr_info" type="string"> + <value val="None"/> + <description is="The property describes the type of the absorption corrections to run and, if necessary, + additional properties of the absorption algorithm to use. The acceptable types are: + is_mc:True (for Monte-Carlo corrections) + is_fast:True (for analytical corrections) This option is default option if no this kind of key is present. + The property sting may have a form: + is_mc:True,NumberOfWavelengthPoints:50,EventsPerPoint:100 or any other non-sample related properties, accepted by Monte-Carlo corrections algorithm + or + is_mc:True,ExpMethod:FastApprox,ElementSize:10 or any other non-sample related accepted by AbsorptionCorrection algorithm + if set up in python script, the info can be provided both as string above and as a python dictionary. + "/> +</parameter> + + <!-- List of the words which can be used as a command line arguments to define reducer keywords the form is reducer_keword1=synonim1=synonim2=synonim3;reducer_keword1=synonim1a, so, the reducer keywords are the leftmost values of the keyword assignments below diff --git a/scripts/Inelastic/Direct/AbsorptionShapes.py b/scripts/Inelastic/Direct/AbsorptionShapes.py index 86de69abe99e1b078bf2cad8f9dad2f44e278873..98fb4bbb510357c005fc802bd21c9f06b8894acc 100644 --- a/scripts/Inelastic/Direct/AbsorptionShapes.py +++ b/scripts/Inelastic/Direct/AbsorptionShapes.py @@ -11,6 +11,7 @@ from mantid.kernel import funcinspect from mantid.simpleapi import * from mantid.api import (AlgorithmManager, Algorithm) + import random import types import ast @@ -85,6 +86,11 @@ class anAbsorptionShape(object): def __del__(self): DeleteWorkspace(self._testWorkspace) # + def __str__(self): + """ Convert an absorption shape into a string representation""" + return str(self._ShapeDescription) + '!' + str(self._Material) + + # @property def material(self): """ Contains the material, used in adsorbtion correction calculations""" @@ -210,9 +216,6 @@ class anAbsorptionShape(object): adsrbtn_correctios = MonteCarloAbsorption(correction_base_ws,**kwarg) return adsrbtn_correctios # - def str(self): - """ Convert an absorption shape into a string representation""" - return str(self._ShapeDescription) + '!' + str(self._Material) # @staticmethod def from_str(str_val): diff --git a/scripts/Inelastic/Direct/PropertiesDescriptors.py b/scripts/Inelastic/Direct/PropertiesDescriptors.py index fd82fae63b789ac32061182ae254b43b150a7ee1..e8816d574b4a2d3eaf7db0bdbf38ba2eddac7cad 100644 --- a/scripts/Inelastic/Direct/PropertiesDescriptors.py +++ b/scripts/Inelastic/Direct/PropertiesDescriptors.py @@ -20,7 +20,7 @@ import mantid.simpleapi as mantid from mantid import api import Direct.ReductionHelpers as prop_helpers -from Direct.AbsorptionShapes import anAbsorptionShape +from Direct.AbsorptionShapes import * import collections @@ -1745,6 +1745,11 @@ class AbsCorrInfo(PropDescriptor): val_dict[key] = check_normalizer(val) # Store new dictionary in the property self._alg_prop = val_dict + def __str__(self): + alg_prop = self.__get__(self,AbsCorrInfo) + return str(alg_prop) + + def _algo_selector(self,algo_key,key_val): if algo_key == 'is_fast': @@ -1752,10 +1757,6 @@ class AbsCorrInfo(PropDescriptor): elif algo_key == 'is_mc': self._is_fast = not bool(key_val) - def str(self): - alg_prop = self.__get__(self,AbsCorrInfo) - return str(alg_prop) - class AbsorptionShapesContainer(PropDescriptor): """ Class to keep AbsorptionShape classes, responsible for making absorption corrections @@ -1781,11 +1782,16 @@ class AbsorptionShapesContainer(PropDescriptor): self._theShapeHolder = None return if isinstance(value,str): - raise RuntimeError('This functionality is Not yet implemented') + self._theShapeHolder = anAbsorptionShape.from_str(value) elif isinstance(value,anAbsorptionShape): self._theShapeHolder = value else: raise ValueError('The property can accept only strings and the childrens of the class anAbsorptionShape') + def __str__(self): + if self._theShapeHolder is None: + return 'None' + else: + return self._theShapeHolder.str() def list_checker(val,list_in,mess_base): """ Helper function to check the value val (first input) belongs to the diff --git a/scripts/test/AbsorptionShapesTest.py b/scripts/test/AbsorptionShapesTest.py index 695414592a936f758c9f9dfb9aabb4fd826adc3d..e55b3a30ec9e7eba9776344823434ac43edc4784 100644 --- a/scripts/test/AbsorptionShapesTest.py +++ b/scripts/test/AbsorptionShapesTest.py @@ -161,7 +161,7 @@ class AdsorbtionShapesTest(unittest.TestCase): def test_string_conversion(self): """ check if shape conversion to string representation works""" ash = HollowCylinder('V',[10,2,4]) - ash_str = ash.str() + ash_str = str(ash) ash_rec = anAbsorptionShape.from_str(ash_str) self.assertTrue(isinstance(ash_rec,HollowCylinder)) @@ -169,7 +169,7 @@ class AdsorbtionShapesTest(unittest.TestCase): self.assertDictEqual(ash.shape,ash_rec.shape) ash = Sphere(['Al',10],10) - ash_str = ash.str() + ash_str = str(ash) ash_rec = anAbsorptionShape.from_str(ash_str) self.assertTrue(isinstance(ash_rec,Sphere)) diff --git a/scripts/test/DirectPropertyManagerTest.py b/scripts/test/DirectPropertyManagerTest.py index 778b5d44c0c47ffea562df1e80492a80b66a3fe3..5532f0808e3a0655d013aacb999cab6174ce91b7 100644 --- a/scripts/test/DirectPropertyManagerTest.py +++ b/scripts/test/DirectPropertyManagerTest.py @@ -1286,6 +1286,22 @@ class DirectPropertyManagerTest(unittest.TestCase): got = propman.correct_absorption_on self.assertEqual(got,cyl) + str_rep_cyl = str(propman.correct_absorption_on) + is_in = 'Shape' in str_rep_cyl + self.assertTrue(is_in) + is_in = 'Cylinder' in str_rep_cyl + self.assertTrue(is_in) + + propman.correct_absorption_on = str_rep_cyl + + got = propman.correct_absorption_on + + self.assertTrue(isinstance(got,Cylinder)) + self.assertEqual(got.material,cyl.material) + self.assertEqual(got.shape,cyl.shape) + + + if __name__ == "__main__": #tester = DirectPropertyManagerTest('test_abs_shapes_container')