Skip to content
Snippets Groups Projects
Commit 4fe43e59 authored by Gröne, Tjark Leon Raphael's avatar Gröne, Tjark Leon Raphael
Browse files

Update 3 files

- /pure code not instalable as environment/backbone/PDF_generation_class.py
- /pure code not instalable as environment/backbone/functions/export.py
- /pure code not instalable as environment/PDF_generator.py
parent c14d8350
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ bg_Reload = None #rootdir + '/processed/' + meas_sampleName + '/Reload_files/bg_
meas_Reload = None #rootdir + '/processed/' + meas_sampleName + '/Reload_files/meas_Reload/' + meas_sampleName + '.mat'
# Correction factors to subtract as well empty glas to counter deviations in cell manufacturing
empty_glas_int =0 # -0.0009683967395722652#-0.01#*(1/120) #0.01 # 0.014 #0.0210336
empty_glas_int = 0 # -0.0009683967395722652#-0.01#*(1/120) #0.01 # 0.014 #0.0210336
empty_glas = None #'C:/Users/admin/Nextcloud/Beamtimes/bt_0423/XRD_detailed/empty_ac_cell_inlet_180_10_Av120.chi'
scatter_supression = 0.0001 # Small correction to dampen deviations from the BG subtraction calculated factor.
......@@ -87,16 +87,18 @@ Rmin = 0.5
Rmax = 30 #maximal R to process the PDF to
Rpoly = 1.7 #polynomal degree which affects getPDFx bg subtraction
# You can crop the data if nescissary, anyhow the BG-subtration discards pre ramp
# and cooldown data if not changed in the options
startScan = 0
endScan = 1e10 # Default setting for normal temperature ramps
#----------------------------------------------------------------------------------------#
# #
# Process data set #
# #
#----------------------------------------------------------------------------------------#
# You can crop the data if nescissary, anyhow the BG-subtration discards pre ramp
# and cooldown data if not changed in the options
startScan = 0
endScan = 1e10 # Default setting for normal temperature ramps
#Loading the background data
bg = PDF_generation_class(path=bg_path, tempPath=bg_tempPath, sampleName=bg_sampleName, startScan=startScan, endScan=endScan, ends_with=ends_with, reload=bg_Reload, average=average, counter_PDF=counter_PDF)
......@@ -132,10 +134,7 @@ bg.PrintLogFile(rootdir + '/processed/' + meas_sampleName + '/Log_files/bg_Log/'
# Finish for the BG part: Now to the real sample
#-----------------------------------------------------------------------------------------#
#Loading the measurment data same as the BG
startScan = 0
endScan = 1e10
meas = PDF_generation_class(path=meas_path, tempPath=meas_tempPath, sampleName=meas_sampleName, startScan=startScan, endScan=1e10, ends_with=ends_with, reload=meas_Reload, without_dark=False, average=average,
meas = PDF_generation_class(path=meas_path, tempPath=meas_tempPath, sampleName=meas_sampleName, startScan=startScan, endScan=endScan, ends_with=ends_with, reload=meas_Reload, without_dark=False, average=average,
Composition=Composition,Qmax=Qmax,Qmaxinst=Qmaxinst, Qmin=Qmin, Rmax=Rmax, Rmin=Rmin, Rpoly=Rpoly, Rstep=0.01, counter_PDF=counter_PDF)
# Similar aproches to get the temperature points
......@@ -151,11 +150,6 @@ endScan = meas.platoend_index
# And saving to a .mat
# meas.saveReload(rootdir + '/processed/' + meas_sampleName + '/Reload_files/meas_Reload/')
# Getting feedback: Not solved nicely I kwon, but it works
print('\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
print(' Reload files created, fast loading possible')
print(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
# Also here we process and save to .dat
meas.outputDatFile(rootdir + '/processed/' + meas_sampleName + '/Dat_files/meas_type1_uncorrected_Dat/')
original = meas.I
......
......@@ -31,7 +31,7 @@ class PDF_generation_class(Plotting_XRD,Processing_Data,Export_PDF_Gen,Import_PD
"""
# The init function declairs all to be set varibles for the class.
def __init__(self, path: str,tempPath: str,sampleName: str,startScan: int,endScan: int, timeOfset=0, ends_with = '.chi', without_dark=True,
def __init__(self, path: str,tempPath: str,sampleName: str,startScan: int=0,endScan: int=1e10, timeOfset=0, ends_with = '.chi', without_dark=True,
figratio1D=[16,9], figratio2D=[7, 4], reload: str = None, number_of_steps: int=1, skiprows_of_files: int = 23, average: int=1, counter_PDF: dict=None,
Composition: str="ZnS", Qmaxinst: float=30, Qmin: float=0.1, Qmax: float=30, Rpoly: float=0.9, Rstep: float=0.01, Rmin: float=0.5, Rmax: float=30):
""" Class type object to automate the generation the PDF (.gr) from TS scans using PDFgetX3 within python.
......
......@@ -27,6 +27,12 @@ class Export_PDF_Plot:
# Save the data
sp_io.savemat(outputPath + "/" + self.sampleName +'.mat', {'G_of_r': self.G, 'r': self.r,'time': self.time_array ,'time_averaged': self.time_averaged_array,'temp': self.temp_array, 'temp_averaged':self.temp_averaged_array})
# Getting feedback: Not solved nicely I kwon, but it works
print('\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
print(f' Reload files created for {self.sampleName}, fast loading possible')
print(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
#----------------------------------------------------------------------------------------#
# export temp as xy #
#----------------------------------------------------------------------------------------#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment