Changeset 1165 for sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures
- Timestamp:
- Jun 5, 2019 4:48:14 PM (4 years ago)
- Location:
- sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf
r1161 r1165 1381 1381 if(V_flag==0) 1382 1382 // only re-initialize if the variables don't exist, so you don't overwrite what users have changed 1383 if( exists("root:Packages:NIST:g XML_Write") != 2) //if the global variable does not exist, initialize1383 if( exists("root:Packages:NIST:gASCII_Write") != 2 || exists("root:Packages:NIST:gXML_Write") != 2 || exists("root:Packages:NIST:gNXcanSAS_Write") != 2) //if the global variable does not exist, initialize 1384 1384 Initialize_Preferences() 1385 1385 endif … … 1433 1433 1434 1434 /// items for everyone 1435 val = NumVarOrDefault("root:Packages:NIST:gASCII_Write", 1 ) 1436 if (val == 1) 1437 WritePref("PrefCtrl_0",1) 1438 endif 1439 Variable/G root:Packages:NIST:gASCII_Write = val 1435 1440 val = NumVarOrDefault("root:Packages:NIST:gXML_Write", 0 ) 1441 if (val == 1) 1442 WritePref("PrefCtrl_0a",1) 1443 endif 1436 1444 Variable/G root:Packages:NIST:gXML_Write = val 1437 1445 val = NumVarOrDefault("root:Packages:NIST:gNXcanSAS_Write", 0 ) 1446 if (val == 1) 1447 WritePref("PrefCtrl_0b",1) 1448 endif 1449 Variable/G root:Packages:NIST:gNXcanSAS_Write = val 1438 1450 1439 1451 end … … 1465 1477 End 1466 1478 1467 Function XMLWritePref(ctrlName,checked) : CheckBoxControl1479 Function WritePref(ctrlName,checked) : CheckBoxControl 1468 1480 String ctrlName 1469 1481 Variable checked 1470 1482 1471 NVAR gVal = root:Packages:NIST:gXML_Write 1472 gVal = checked 1473 End 1474 1475 Function NXWritePref(ctrlName,checked) : CheckBoxControl 1476 String ctrlName 1477 Variable checked 1478 1479 NVAR gVal = root:Packages:NIST:gNXcanSAS_Write 1480 gVal = checked 1483 NVAR asciiVal = root:Packages:NIST:gASCII_Write 1484 NVAR xmlVal = root:Packages:NIST:gXML_Write 1485 NVAR nxVal = root:Packages:NIST:gNXcanSAS_Write 1486 1487 strswitch (ctrlName) 1488 case "PrefCtrl_0": 1489 CheckBox PrefCtrl_0,value=1 1490 asciiVal = checked 1491 CheckBox PrefCtrl_0a,value=0 1492 xmlVal = 0 1493 CheckBox PrefCtrl_0b,value=0 1494 nxVal = 0 1495 break 1496 case "PrefCtrl_0a": 1497 CheckBox PrefCtrl_0,value=0 1498 asciiVal = 0 1499 CheckBox PrefCtrl_0a,value=1 1500 xmlVal = checked 1501 CheckBox PrefCtrl_0b,value=0 1502 nxVal = 0 1503 break 1504 case "PrefCtrl_0b": 1505 CheckBox PrefCtrl_0,value=0 1506 asciiVal = 0 1507 CheckBox PrefCtrl_0a,value=0 1508 xmlVal = 0 1509 CheckBox PrefCtrl_0b,value=1 1510 nxVal = checked 1511 endswitch 1481 1512 End 1482 1513 … … 1548 1579 1549 1580 //on tab(0) - General - initially visible 1550 CheckBox PrefCtrl_0a,pos={21,96},size={124,14},proc=XMLWritePref,title="Use canSAS XML Output" 1551 CheckBox PrefCtrl_0a,help={"Checking this will set the default output format to be canSAS XML rather than NIST 6 column"} 1581 CheckBox PrefCtrl_0,pos={21,100},size={124,14},proc=WritePref,title="Use ASCII 6-column Output (default)",mode=1 1582 CheckBox PrefCtrl_0,help={"Checking this will set the default output to the NIST 6 column format"} 1583 CheckBox PrefCtrl_0,value= root:Packages:NIST:gASCII_Write 1584 CheckBox PrefCtrl_0a,pos={21,120},size={124,14},proc=WritePref,title="Use canSAS XML Output",mode=1 1585 CheckBox PrefCtrl_0a,help={"Checking this will set the default output to be canSAS XML format"} 1552 1586 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 1587 CheckBox PrefCtrl_0b,pos={21,140},size={124,14},proc=WritePref,title="Use NXcanSAS HDF5 Output",mode=1 1588 CheckBox PrefCtrl_0b,help={"Checking this will set the default output to be NXcanSAS HDF5 format"} 1589 CheckBox PrefCtrl_0b,value= root:Packages:NIST:gNXcanSAS_Write 1557 1590 1558 1591 //on tab(1) - SANS -
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/SANS/AvgGraphics.ipf
r1161 r1165 160 160 if (useXMLOutput == 1) 161 161 WriteXMLWaves_W_Protocol(type,"",1) 162 else 162 elseif (useNXcanSASOutput == 1) 163 163 WriteNxCanSAS1D(type,"",1) 164 164 else 165 165 WriteWaves_W_Protocol(type,"",1) //"" is an empty path, 1 will force a dialog 166 166 endif 167 endswitch 167 168 EndIf 168 169 -
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/SANS/NCNR_Includes_v520.ipf
r950 r1165 98 98 //#include "MC_Script_Panels" 99 99 100 // JRK JUN 2019 -- import NXcanSAS writer 101 #include "WriteHDF5" 102 100 103 // a simple list of items to add to the Beta menu 101 104 // to allow testing of these features -
sans/Dev/branches/nxcansas_writer/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf
r1042 r1165 1477 1477 1478 1478 NVAR useXMLOutput = root:Packages:NIST:gXML_Write 1479 NVAR useNXcanSASOutput = root:Packages:NIST:gNXcanSAS_Write 1479 1480 1480 1481 //Parse the instructions in the prot wave … … 1915 1916 if(useXMLOutput == 1) 1916 1917 exten += "x" 1918 elseif(useNXcanSASOutput == 1) 1919 exten = "h5" 1917 1920 endif 1918 1921 endif … … 1954 1957 if (useXMLOutput == 1) 1955 1958 WriteXMLWaves_W_Protocol(activeType,fullPath,dialog) 1959 elseif (useNXcanSASOutput == 1) 1960 WriteNxCanSAS1D(activeType,fullPath,dialog) 1956 1961 else 1957 1962 WriteWaves_W_Protocol(activeType,fullpath,dialog)
Note: See TracChangeset
for help on using the changeset viewer.