- Timestamp:
- Mar 9, 2007 3:25:31 PM (16 years ago)
- Location:
- sans/SASCalc/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/SASCalc/trunk/SASCALC.ipf
r46 r52 6 6 // 30 OCT 2006 SRK - corrected beamDiameter size in attenuator calculation (Bh vs Bm) 7 7 // 11 DEC 2006 SRK - added 2.5 cm A1 option for NG3@7guide config 8 // 09 MAR 2007 SRK - now appends text of each frozen configuration for printing 9 // - colorized frozen traces so that they aren't all red (unfrozen is black) 8 10 // 9 11 // calculate what q-values you get based on the instruments settings … … 16 18 // - add in instrument conditions for lens/(lens+prism) configurations 17 19 // - proper resolution calculation for lens/prism 20 // - don't use the corners... misleading high Q limit (just max horiz?) - make a default mask 21 18 22 // 19 23 // Optional: 20 24 // - freeze configurations with a user defined tag 21 25 // - different model functions (+ change simple parameters) 22 // - smeared models23 26 // - resolution smeared models 27 // - "simulation" of data and error bars given a model and a total number of detector counts 24 28 // - sequence of colors for frozen plots 25 29 // - streamline code (globals needed in panel vs. wave needed for calculation) … … 37 41 // - get SDD value to update when switching NG7->NG3 and illegal value 38 42 // - disallow 6 guides at NG3 (post a warning) 39 // - don't use the corners... misleading high Q limit (just max horiz?) - make a default mask40 43 // 41 44 // … … 591 594 End 592 595 596 //freezes the current configuration 597 // -1- duplicates the trace on the graph 598 // -2- copies the configuration text to a second notebook window for printing 593 599 Function FreezeButtonProc(ctrlName) : ButtonControl 594 600 String ctrlName 595 601 602 String str="" 596 603 NVAR ct=root:SAS:gFreezeCount 597 604 SetDataFolder root:SAS … … 602 609 ModifyGraph mode=3 603 610 ModifyGraph marker=19 611 switch(mod(ct,10)) // 10 different colors - black is the unfrozen color 612 case 0: 613 ModifyGraph rgb($("aveint_"+num2str(ct)))=(65535,16385,16385) 614 break 615 case 1: 616 ModifyGraph rgb($("aveint_"+num2str(ct)))=(2,39321,1) 617 break 618 case 2: 619 ModifyGraph rgb($("aveint_"+num2str(ct)))=(0,0,65535) 620 break 621 case 3: 622 ModifyGraph rgb($("aveint_"+num2str(ct)))=(39321,1,31457) 623 break 624 case 4: 625 ModifyGraph rgb($("aveint_"+num2str(ct)))=(48059,48059,48059) 626 break 627 case 5: 628 ModifyGraph rgb($("aveint_"+num2str(ct)))=(65535,32768,32768) 629 break 630 case 6: 631 ModifyGraph rgb($("aveint_"+num2str(ct)))=(0,65535,0) 632 break 633 case 7: 634 ModifyGraph rgb($("aveint_"+num2str(ct)))=(16385,65535,65535) 635 break 636 case 8: 637 ModifyGraph rgb($("aveint_"+num2str(ct)))=(65535,32768,58981) 638 break 639 case 9: 640 ModifyGraph rgb($("aveint_"+num2str(ct)))=(36873,14755,58982) 641 break 642 endswitch 643 604 644 ct +=1 605 645 SetDataFolder root: 606 646 647 // create or append the configuration to a new notebook 648 if(WinType("Saved_Configurations")==0) 649 NewNotebook/F=1/N=Saved_Configurations /W=(480,400,880,725) 650 endif 651 //append the text 652 sprintf str,"\rConfiguration #%d\r",ct-1 653 Notebook Saved_Configurations showRuler=0,defaultTab=20,selection={endOfFile, endOfFile} 654 Notebook Saved_Configurations font="Monaco",fSize=10,fstyle=1,text=str //bold 655 Notebook Saved_Configurations font="Monaco",fSize=10,fstyle=0,text=SetConfigurationText() 607 656 return(0) 608 657 End 609 658 659 //clears the frozen traces on the graph, asks if you want to clear the saved text 660 // 610 661 Function ClearButtonProc(ctrlName) : ButtonControl 611 662 String ctrlName … … 622 673 ct=0 623 674 setdatafolder root: 675 676 DoAlert 1,"Do you also want to clear the \"Saved Configurations\" text?" 677 if(V_flag == 1) // yes 678 DoWindow/K Saved_Configurations 679 endif 680 624 681 return(0) 625 682 End … … 1201 1258 Function DisplayConfigurationText() 1202 1259 1203 if(WinType(" ConfigText")==0)1204 NewNotebook/F=0/K=1/N= ConfigText/W=(480,44,880,369)1260 if(WinType("Trial_Configuration")==0) 1261 NewNotebook/F=0/K=1/N=Trial_Configuration /W=(480,44,880,369) 1205 1262 endif 1206 1263 //replace the text 1207 Notebook ConfigTextselection={startOfFile, endOfFile}1208 Notebook ConfigTextfont="Monaco",fSize=10,text=SetConfigurationText()1264 Notebook Trial_Configuration selection={startOfFile, endOfFile} 1265 Notebook Trial_Configuration font="Monaco",fSize=10,text=SetConfigurationText() 1209 1266 return(0) 1210 1267 end
Note: See TracChangeset
for help on using the changeset viewer.