Changeset 4190


Ignore:
Timestamp:
Nov 6, 2019 6:06:30 AM (2 years ago)
Author:
vondreele
Message:

add sample parameters to PWDR csv export file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_csv.py

    r4119 r4190  
    187187            else:
    188188                line = '"Instparm: %s",%10.2f'%(parm,Parms[parm][1])
     189            self.Write(line)
     190        Samp = self.Histograms[TreeName]['Sample Parameters']
     191        for samp in Samp:
     192            if samp in ['InstrName','Type']:
     193                line = '"Samparm: %s",%s'%(samp,Samp[samp])
     194            elif samp in ['Azimuth','Chi','Gonio. radius','Omega','Phi','Pressure','Temperature','Time']:
     195                line = '"Samparm: %s",%10.2f'%(samp,Samp[samp])
     196            elif samp in ['DisplaceX','DisplaceY','Scale','Shift','SurfRoughA','SurfRoughB','Transparency']:
     197                line = '"Samparm: %s",%10.2f'%(samp,Samp[samp][0])
     198            else:
     199                continue
    189200            self.Write(line)
    190201        WriteList(self,("x","y_obs","weight","y_calc","y_bkg","Q"))
Note: See TracChangeset for help on using the changeset viewer.