Changeset 1161 for sans/Dev/trunk


Ignore:
Timestamp:
Jun 4, 2019 4:37:36 PM (4 years ago)
Author:
krzywon
Message:

Tie the NXcanSAS writers into the GUI for 1D SANS and USANS reduction (untested).

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf

    r1133 r1161  
    14731473End 
    14741474 
     1475Function NXWritePref(ctrlName,checked) : CheckBoxControl 
     1476        String ctrlName 
     1477        Variable checked 
     1478         
     1479        NVAR gVal = root:Packages:NIST:gNXcanSAS_Write 
     1480        gVal = checked 
     1481End 
     1482 
    14751483Function DoTransCorrPref(ctrlName,checked) : CheckBoxControl 
    14761484        String ctrlName 
     
    15431551        CheckBox PrefCtrl_0a,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 
    15441552        CheckBox PrefCtrl_0a,value= root:Packages:NIST:gXML_Write 
     1553        CheckBox PrefCtrl_0a,pos={21,116},size={124,14},proc=NXWritePref,title="Use NXcanSAS HDF5 Output" 
     1554        CheckBox PrefCtrl_0a,help={"Checking this will set the default output format to be NXcanSAS HDF5 rather than NIST 6 column"} 
     1555        CheckBox PrefCtrl_0a,value= root:Packages:NIST:gNXcanSAS_Write 
     1556 
    15451557 
    15461558//on tab(1) - SANS 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/AvgGraphics.ipf

    r764 r1161  
    7070        SVAR type=root:myGlobals:gDataDisplayType 
    7171        NVAR useXMLOutput = root:Packages:NIST:gXML_Write 
     72        NVAR useNXcanSASOutput = root:Packages:NIST:GNXcanSAS_Write 
    7273 
    7374        //Check for logscale data in "type" folder 
     
    126127                case "Rectangular":              
    127128                        RectangularAverageTo1D(type) 
    128                         If(doSave)                                      //save the file, acting on the currently displayed file 
    129                                 if (useXMLOutput == 1) 
    130                                         WriteXMLWaves_W_Protocol(type,"",1) 
    131                                 else 
    132                                         WriteWaves_W_Protocol(type,"",1)                //"" is an empty path, 1 will force a dialog 
    133                                 endif 
    134                         Endif 
    135129                        break                                    
    136130                case "Annular":          
    137131                        AnnularAverageTo1D(type) 
    138                         If(doSave)              // XML here yet 
    139                                 //save the file, acting on the currently displayed file 
    140                                 WritePhiave_W_Protocol(type,"",1)               //"" is an empty path, 1 will force a dialog 
    141                         Endif 
    142132                        break 
    143133                case "Circular": 
     
    145135                        //circular or sector 
    146136                        CircularAverageTo1D(type)               //graph is drawn here 
    147                         If(doSave) 
     137                        break 
     138                case "2D ASCII": 
     139                        Fast2dExport(type,"",1) 
     140                        break 
     141                case "QxQy ASCII": 
     142                        QxQy_Export(type,"",1) 
     143                        break 
     144                case "Sector_PlusMinus": 
     145                        Sector_PlusMinus1D(type) 
     146                        break 
     147                default:                                                 
     148                        Abort "no case match in average dispatch" 
     149        endswitch 
     150         
     151        if(doSave) 
     152                strswitch(choice) 
     153                        case "Annular": 
     154                                WritePhiave_W_Protocol(type,"",1) 
     155                                break 
     156                        case "2D ASCII": 
     157                        case "QxQy ASCII": 
     158                                break 
     159                        default: 
    148160                                if (useXMLOutput == 1) 
    149161                                        WriteXMLWaves_W_Protocol(type,"",1) 
     162                                else if (useNXcanSASOutput == 1) 
     163                                        WriteNxCanSAS1D(type,"",1) 
    150164                                else 
    151165                                        WriteWaves_W_Protocol(type,"",1)                //"" is an empty path, 1 will force a dialog 
    152166                                endif 
    153                         Endif 
    154                         break 
    155                 case "2D ASCII": 
    156                         Fast2dExport(type,"",1) 
    157                         break 
    158                 case "QxQy ASCII": 
    159                         QxQy_Export(type,"",1) 
    160                         break 
    161                 case "Sector_PlusMinus": 
    162                         Sector_PlusMinus1D(type) 
    163                         If(doSave) 
    164                                 if (useXMLOutput == 1) 
    165                                         WriteXMLWaves_W_Protocol(type,"",1) 
    166                                 else 
    167                                         WriteWaves_W_Protocol(type,"",1)                //"" is an empty path, 1 will force a dialog 
    168                                 endif 
    169                         Endif 
    170                         break 
    171                 default:                                                 
    172                         Abort "no case match in average dispatch" 
    173         endswitch 
     167        EndIf 
    174168         
    175169        //convert back to log scaling if I changed it... 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/COR_Graph.ipf

    r907 r1161  
    215215        SVAR USANSFolder = root:Packages:NIST:USANS:Globals:gUSANSFolder 
    216216        NVAR useXMLOutput = root:Packages:NIST:gXML_Write 
     217        NVAR useNXcanSASOutput = root:Packages:NIST:gNXcanSAS_Write 
    217218 
    218219         
     
    263264        if (useXMLOutput == 1) 
    264265                WriteXMLUSANSWaves(type,"",ptA,ptB,1) 
     266        else if (useNXcanSASOutput == 1) 
     267                WriteUSANSNXCanSAS(type,"",ptA,ptB,1) 
    265268        else 
    266269                WriteUSANSWaves(type,"",ptA,ptB,1) 
Note: See TracChangeset for help on using the changeset viewer.