- Timestamp:
- Jul 22, 2019 11:58:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/VSANS/V_Write_VSANS_NXcanSAS.ipf
r1184 r1186 82 82 Make/O/T/N=5 $(dataBase + ":attrVals") = {"SASdata","I","Q","NXdata","0",V_getDataEndTime(folderStr)} 83 83 CreateStrNxCansas(fileID,dataParent,"","",empty,$(dataBase + ":attr"),$(dataBase + ":attrVals")) 84 // 85 // TODO: Reinstate Qdev/resolutions when I can fix the reader issue 86 // 84 87 // Create q entry 85 88 NewDataFolder/O/S $(dataBase + ":q") 86 Make/ T/N=2 $(dataBase + ":q:attr") = {"units","resolutions"}87 Make/ T/N=2 $(dataBase + ":q:attrVals") = {"1/angstrom","Qdev"}89 Make/O/T/N=2 $(dataBase + ":q:attr") = {"units"}//,"resolutions"} 90 Make/O/T/N=2 $(dataBase + ":q:attrVals") = {"1/angstrom"}//,"Qdev"} 88 91 CreateVarNxCansas(fileID,dataParent,"sasdata","Q",qw,$(dataBase + ":q:attr"),$(dataBase + ":q:attrVals")) 89 92 // Create i entry … … 126 129 // 127 130 // TODO: 128 // -- This is a placeholder for the final NXcanSAS writer for VSANS data.129 131 // -- resolution is not generated here (and it shouldn't be) since resolution is not known yet. 130 132 // -- The final writer will need to be aware of resolution, and there may be different forms … … 153 155 if(!fileID) 154 156 abort "Unable to create file at " + saveName + "." 155 else156 Variable sasentry = NumVarOrDefault("root:Packages:NIST:gSASEntryNumber", 1)157 sPrintf parentBase,"%s:sasentry%d",base,sasentry // Igor memory base path for all158 sPrintf nxcansasBase,"/sasentry%d/",sasentry // HDF5 base path for all159 157 EndIf 158 159 Variable sasentry = NumVarOrDefault("root:Packages:NIST:gSASEntryNumber", 1) 160 sPrintf parentBase,"%s:sasentry%d",base,sasentry // Igor memory base path for all 161 sPrintf nxcansasBase,"/sasentry%d/",sasentry // HDF5 base path for all 160 162 161 163 // declare, or make a fake protocol if needed (if the export type is RAW) … … 239 241 deltaLam = V_getWavelength_spread(type) 240 242 // TODO -- decipher which beamstop, if any is actually in place 241 // or -- V_getBeamStopC3_size(type)243 // or -- V_getBeamStopC3_size(type) 242 244 bstop = V_getBeamStopC2_size(type) 243 245 … … 250 252 WAVE data_err = V_getDetectorDataErrW(type,detStr) 251 253 252 // TO OD- replace hard wired paths with Read functions254 // TODO - replace hard wired paths with Read functions 253 255 // hard-wired 254 256 Wave qx_val = $("root:Packages:NIST:VSANS:"+type+":entry:instrument:detector_"+detStr+":qx_"+detStr) … … 778 780 CreateVarNxCansas(fileID,sampleParent,"","transmission",$(sampleBase + ":transmission"),empty,empty) 779 781 782 // Create SASsample temperature entry 783 If(V_getSampleTemperature(folderStr) != -999999) 784 Make/O/N=1 $(sampleBase + ":temperature") = {V_getSampleTemperature(folderStr)} 785 CreateVarNxCansas(fileID,sampleParent,"","temperature",$(sampleBase + ":temperature"),empty,empty) 786 EndIf 787 788 // 789 // TODO: Include other sample environment when they are available 790 780 791 // SASprocess 781 792 SVAR samFiles = root:Packages:NIST:VSANS:Globals:Protocols:gSAM … … 791 802 protoStr8 = proto[8] 792 803 endif 793 String processNote = "" 794 sPrintf processNote,"SAM: %s\r\n",samFiles 795 sPrintf processNote,"%sBGD: %s\r\n",processNote,proto[0] 796 sPrintf processNote,"%sEMP: %s\r\n",processNote,Proto[1] 797 sPrintf processNote,"%sDIV: %s\r\n",processNote,Proto[2] 798 sPrintf processNote,"%sMASK: %s\r\n",processNote,Proto[3] 799 sPrintf processNote,"%sABS Parameters (3-6): %s\r\n",processNote,Proto[4] 800 sPrintf processNote,"%sAverage Choices: %s\r\n",processNote,Proto[5] 801 sPrintf processNote,"%sBeginning Trim Points: %s\r\n",processNote,ProtoStr7 802 sPrintf processNote,"%sEnd Trim Points: %s\r\n",processNote,ProtoStr8 803 sPrintf processNote,"%sCOLLIMATION=%s\r\n",processNote,proto[9] 804 String processNote0,processNote1,processNote2,processNote3,processNote4 805 String processNote5,processNote6,processNote7,processNote8,processNote9 806 sPrintf processNote0,"SAM: %s",samFiles 807 sPrintf processNote1,"BGD: %s",Proto[0] 808 sPrintf processNote2,"EMP: %s",Proto[1] 809 sPrintf processNote3,"DIV: %s",Proto[2] 810 sPrintf processNote4,"MASK: %s",Proto[3] 811 sPrintf processNote5,"ABS Parameters (3-6): %s",Proto[4] 812 sPrintf processNote6,"Average Choices: %s",Proto[5] 813 sPrintf processNote7,"Beginning Trim Points: %s",ProtoStr7 814 sPrintf processNote8,"End Trim Points: %s",ProtoStr8 815 sPrintf processNote9,"COLLIMATION=%s",proto[9] 804 816 // Create SASprocess entry 805 817 String processParent = parentBase + "sasprocess/" … … 812 824 Make/O/T/N=1 $(processBase + ":name") = {samFiles} 813 825 CreateStrNxCansas(fileID,processParent,"","name",$(processBase + ":name"),empty,empty) 814 // Create SASprocess note entry 815 816 // 817 // TODO: Reinstate SASprocess.note when I figure out why it won't save 818 // 819 820 //Make/O/T/N=1 $(processBase + ":note") = {processNote} 821 //CreateStrNxCansas(fileID,processParent,"","note",$(processBase + ":note"),empty,empty) 826 // Create SASprocess note entries 827 Make/O/T/N=1 $(processBase + ":note0") = {processNote0} 828 CreateStrNxCansas(fileID,processParent,"","note0",$(processBase + ":note0"),empty,empty) 829 Make/O/T/N=1 $(processBase + ":note1") = {processNote1} 830 CreateStrNxCansas(fileID,processParent,"","note1",$(processBase + ":note1"),empty,empty) 831 Make/O/T/N=1 $(processBase + ":note2") = {processNote2} 832 CreateStrNxCansas(fileID,processParent,"","note2",$(processBase + ":note2"),empty,empty) 833 Make/O/T/N=1 $(processBase + ":note3") = {processNote3} 834 CreateStrNxCansas(fileID,processParent,"","note3",$(processBase + ":note3"),empty,empty) 835 Make/O/T/N=1 $(processBase + ":note4") = {processNote4} 836 CreateStrNxCansas(fileID,processParent,"","note4",$(processBase + ":note4"),empty,empty) 837 Make/O/T/N=1 $(processBase + ":note5") = {processNote5} 838 CreateStrNxCansas(fileID,processParent,"","note5",$(processBase + ":note5"),empty,empty) 839 Make/O/T/N=1 $(processBase + ":note6") = {processNote6} 840 CreateStrNxCansas(fileID,processParent,"","note6",$(processBase + ":note6"),empty,empty) 841 Make/O/T/N=1 $(processBase + ":note7") = {processNote7} 842 CreateStrNxCansas(fileID,processParent,"","note7",$(processBase + ":note7"),empty,empty) 843 Make/O/T/N=1 $(processBase + ":note8") = {processNote8} 844 CreateStrNxCansas(fileID,processParent,"","note8",$(processBase + ":note8"),empty,empty) 845 Make/O/T/N=1 $(processBase + ":note9") = {processNote9} 846 CreateStrNxCansas(fileID,processParent,"","note9",$(processBase + ":note9"),empty,empty) 822 847 823 848 End
Note: See TracChangeset
for help on using the changeset viewer.