Changeset 3389


Ignore:
Timestamp:
May 15, 2018 2:50:25 PM (4 years ago)
Author:
vondreele
Message:

add instrumnt parameters to powder csv export routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_csv.py

    r3299 r3389  
    180180        histblk = self.Histograms[TreeName]
    181181        Parms = self.Histograms[TreeName]['Instrument Parameters'][0]
     182        for parm in Parms:
     183            if parm in ['Type','Source',]:
     184                line = '"Instparm: %s","%s"'%(parm,Parms[parm][0])
     185            elif parm in ['Lam','Zero',]:
     186                line = '"Instparm: %s",%10.6f'%(parm,Parms[parm][1])
     187            else:
     188                line = '"Instparm: %s",%10.2f'%(parm,Parms[parm][1])
     189            self.Write(line)
    182190        WriteList(self,("x","y_obs","weight","y_calc","y_bkg","Q"))
    183191        digitList = 2*((13,3),) + ((13,5),) + 3*((13,3),)
Note: See TracChangeset for help on using the changeset viewer.