minor format changes
This commit is contained in:
@@ -70,3 +70,81 @@ class Header:
|
||||
if '-Y' not in callString:
|
||||
callString += f' -Y {datetime.now().year}'
|
||||
return callString
|
||||
#-------------------------------------------------------------------------------------------------
|
||||
def call_string():
|
||||
base = 'python eos.py '
|
||||
|
||||
inpt = ''
|
||||
if clas.year:
|
||||
inpt += f' --year {clas.year}'
|
||||
else:
|
||||
inpt += f' --year {datetime.now().year}'
|
||||
if clas.dataPath:
|
||||
inpt += f' --dataPath {clas.dataPath}'
|
||||
if clas.subtract:
|
||||
inpt += f' -subtract {clas.subtract}'
|
||||
if clas.normalisationFileIdentifier:
|
||||
inpt += f' -r {clas.normalisationFileIdentifier}'
|
||||
# get file list somehow
|
||||
if ...:
|
||||
inpt += f' -n {file_list}'
|
||||
else:
|
||||
inpt += f' -n {clas.fileIdentifier}'
|
||||
|
||||
otpt = ''
|
||||
if outputFormats != 'Rqz.ort':
|
||||
otpt = f" -of '{outputFormats}'"
|
||||
if clas.outputName:
|
||||
otpt += f' -o {clas.outputName}'
|
||||
else:
|
||||
pass
|
||||
# default name
|
||||
|
||||
mask = ''
|
||||
if clas.yRange:
|
||||
mask += f' -y {clas.yRange}'
|
||||
if clas.lambdaRange:
|
||||
mask += f' -l {clas.lambdaRange}'
|
||||
if clas.thetaRange:
|
||||
mask += f' -- thetaRange {clas.thetaRange}'
|
||||
elif clas.thetaRangeR:
|
||||
mask += f' -t {clas.thetaRangeR}'
|
||||
if clas.qzRange:
|
||||
mask += f' -q {clas.qzRange}'
|
||||
if clas.qResolution:
|
||||
mask += f' -a {clas.qResolution}'
|
||||
|
||||
para = ''
|
||||
if clas.chopperPhase:
|
||||
para += f' --chopperPhase {clas.chopperPhase}'
|
||||
if clas.chopperPhaseOffset:
|
||||
para += f' --chopperPhaseOffset {clas.chopperPhaseOffset}'
|
||||
if clas.mu:
|
||||
para += f' --mu {clas.mu}'
|
||||
elif clas.muOffset:
|
||||
para += f' --muOffset {clas.muOffset}'
|
||||
if clas.nu:
|
||||
para += f' --nu {clas.nu}'
|
||||
|
||||
if clas.sampleModel:
|
||||
modl = f" --sampleModel '{clas.sampleModel}'"
|
||||
|
||||
acts = ''
|
||||
if clas.autoscale:
|
||||
acts += f' --autoscale {clas.autoscale}'
|
||||
if clas.scale:
|
||||
acts += f' --scale {clas.scale}'
|
||||
if clas.timeSlize:
|
||||
acts += f' --timeSlize {clas.timeSlize}'
|
||||
|
||||
mlst = base + '\n' + inpt + '\n' + outp
|
||||
if mask:
|
||||
mlst += '\n' + mask
|
||||
if para:
|
||||
mlst += '\n' + para
|
||||
if acts:
|
||||
mlst += '\n' + acts
|
||||
if mask:
|
||||
mlst += '\n' + modl
|
||||
|
||||
return mlst
|
||||
|
||||
@@ -229,7 +229,7 @@ class AmorReduction:
|
||||
if len(filter_q[filter_q]) > 0:
|
||||
scale = np.sum(R_q[filter_q]**2/dR_q[filter_q]) / np.sum(R_q[filter_q]/dR_q[filter_q])
|
||||
else:
|
||||
logging.warning(f'# automatic scaling not possible')
|
||||
logging.warning('# automatic scaling not possible')
|
||||
scale = 1.
|
||||
else:
|
||||
filter_q = np.where(np.isnan(pR_q*R_q), False, True)
|
||||
@@ -239,7 +239,7 @@ class AmorReduction:
|
||||
scale = np.sum(R_q[filter_q]**3 * pR_q[filter_q] / (dR_q[filter_q]**2 * pdR_q[filter_q]**2)) \
|
||||
/ np.sum(R_q[filter_q]**2 * pR_q[filter_q]**2 / (dR_q[filter_q]**2 * pdR_q[filter_q]**2))
|
||||
else:
|
||||
logging.warning(f'# automatic scaling not possible')
|
||||
logging.warning('# automatic scaling not possible')
|
||||
scale = 1.
|
||||
R_q /= scale
|
||||
dR_q /= scale
|
||||
@@ -378,7 +378,7 @@ class AmorReduction:
|
||||
#theta_lz += np.rad2deg( np.arctan( 3.07e-10 * (fromHDF.detectorDistance + detXdist_e) * lamda_lz**2 ) )
|
||||
theta_lz += np.rad2deg( np.arctan( 3.07e-10 * fromHDF.detectorDistance * lamda_lz**2 ) )
|
||||
|
||||
z_z = enumerate(theta_z)
|
||||
#z_z = enumerate(theta_z)
|
||||
qz_lz = 4.0*np.pi * np.sin(np.deg2rad(theta_lz)) / lamda_lz
|
||||
int_lz, bins_l, bins_z = np.histogram2d(lamda_e, detZ_e, bins = (lamda_l, self.grid.z()))
|
||||
# cut normalisation sample horizon
|
||||
|
||||
Reference in New Issue
Block a user