# Changeset 393

Ignore:
Timestamp:
Jul 15, 2008 11:19:38 AM (14 years ago)
Message:

DoSaveFileDialog? now takes two optional parameters, fname and suffix that can speed file save/rename, especially when used with the subtract1D operation.

Invariant now has a new macro to solve for the volume fraction.

PNGs are used wherever possible for reports. Gizmo window are still the oddball, and are limited to native platform formats.

Location:
sans/Dev/trunk/NCNR_User_Procedures/SANS
Files:
5 edited

Unmodified
Removed
• ## sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/GlobalFit/GlobalFit2_NCNR_v40.ipf

 r309 //the graph Notebook \$nb picture={\$topGraph(0, 0, 400, 300), 0, 1}, text="\r" Notebook \$nb picture={\$topGraph(0, 0, 400, 300), -5, 1}, text="\r" // show the top of the report
• ## sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Invariant/Invariant_v40.ipf

 r379 Printf "The model invariant is %g A^-3 cm^-1\r\r",inv End // for testing - compare to the "perfect" value. This macro // calculates the invariant based on the contrast and volume fraction // - the extrapolated/integrated value should match this... Macro SolveForVolumeFraction(invariant,delta_rho) Variable invariant,delta_rho=6e-6 // delta_rho [=] 1/A^2 Variable phi1,phi2,arg arg = 1 - 4*invariant*(1e-8)/2/pi/pi/delta_rho/delta_rho phi1 = (1 - sqrt(arg))/2 phi2 = (1 + sqrt(arg))/2 Printf "The two solutions for phi are: %8.6f\t and %8.6f\r\r",phi1,phi2 End
• ## sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Wrapper_v40.ipf

 r392 // insert graphs if(WaveExists(dataXw)) Notebook \$nb picture={\$topGraph(0, 0, 400, 300), 0, 1}, text="\r" Notebook \$nb picture={\$topGraph(0, 0, 400, 300), -5, 1}, text="\r" // else            //must be 2D Gizmo Execute "ExportGizmo Clip" Execute "ExportGizmo Clip"                      //this ALWAYS is a PICT or BMP. Gizmo windows are different... LoadPict/Q/O "Clipboard",tmp_Gizmo Notebook \$nb picture={tmp_Gizmo(0, 0, 400, 300), 0, 1}, text="\r"
• ## sans/Dev/trunk/NCNR_User_Procedures/SANS/Reduction/Subtract_1D.ipf

 r328 endif fileName = DoSaveFileDialog("Save Data as") SVAR loadedFile=root:myGlobals:Subtract1D:gName1 fileName = DoSaveFileDialog("Save Data as",fname=loadedFile,suffix="b") if(cmpstr(fileName,"")==0) return(1)
• ## sans/Dev/trunk/NCNR_User_Procedures/SANS/Reduction/WriteQIS.ipf

 r328 // returns the path to the file, or null if the user cancelled Function/S DoSaveFileDialog(msg) String msg // fancy use of optional parameters Function/S DoSaveFileDialog(msg,[fname,suffix]) String msg,fname,suffix Variable refNum //      String message = "Save the file as" String outputPath Open/D/M=msg/T="????" refNum if(ParamIsDefault(fname)) //              Print "fname not supplied" fname = "" endif if(ParamIsDefault(suffix)) //              Print "suffix not supplied" suffix = "" endif String outputPath,tmpName tmpName = fname + suffix Open/D/M=msg/T="????" refNum as tmpName outputPath = S_fileName
Note: See TracChangeset for help on using the changeset viewer.