Changeset 318


Ignore:
Timestamp:
Apr 25, 2008 10:54:10 AM (14 years ago)
Author:
srkline
Message:

(1) Adding error handling if the help file/topic cannot be found
(2) SumModel? now redimensions the hold/lo/hi/epsilon waves in the fitWrapper table to match the "new" summed model if the user changes functions to ones with a different total number of parameters. hold/lo/hi are extended or contracted (since I don't know what to fill in. Epsilon wave is reset in the plot Macro, since it may not be reset if the user does not pop either the function or coefficient - and this is very likely to be the case...

Location:
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/Packages/Invariant/Invariant_v40.ipf

    r273 r318  
    487487        String ctrlName 
    488488 
    489         DisplayHelpTopic "Calculate Scattering Invariant" 
     489        DisplayHelpTopic/Z/K=1 "Calculate Scattering Invariant" 
     490        if(V_flag != 0) 
     491                DoAlert 0, "The Scattering Invariant Help file can not be found" 
     492        endif 
    490493End 
    491494 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/Packages/LinearizedFits/LinearizedFits_v40.ipf

    r314 r318  
    125125Proc A_showFITHelp(ctrlName): ButtonControl 
    126126        String ctrlName 
    127         DisplayHelpTopic "Linearized Fits" 
     127        DisplayHelpTopic/Z/K=1 "Linearized Fits" 
     128        if(V_flag != 0) 
     129                DoAlert 0, "The Linearized Fit Help file can not be found" 
     130        endif 
    128131end 
    129132 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/Packages/ModelPicker/SANSModelPicker_v40.ipf

    r304 r318  
    272272 
    273273        if(cmpstr(ctrlName,"PickerButton")==0)          //PickerButton is the picker help 
    274                 DisplayHelpTopic "SANS Model Picker" 
     274                DisplayHelpTopic/Z/K=1 "SANS Model Picker" 
     275                if(V_flag !=0) 
     276                        DoAlert 0,"The SANS Model Picker Help file could not be found" 
     277                endif 
    275278                return(0) 
    276279        endif 
     
    313316//              Print fname[strlen(fname)-11,strlen(fname)-1] 
    314317                if(cmpstr(fname[strlen(fname)-7,strlen(fname)-1],"_Sq.ipf") ==0 ) 
    315                         DisplayHelpTopic "How Form Factors and Structure Factors are Combined" 
     318                        DisplayHelpTopic/Z/K=1 "How Form Factors and Structure Factors are Combined" 
     319                        if(V_flag !=0) 
     320                                DoAlert 0,"The Help file could not be found" 
     321                        endif 
    316322                else 
    317                         DisplayHelpTopic fname 
     323                        DisplayHelpTopic/Z/K=1 fname 
     324                        if(V_flag !=0) 
     325                                DoAlert 0,"The Help file could not be found for " + fname 
     326                        endif 
    318327                endif 
    319328        else 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/Packages/SumModel/SumSANSModels_v40.ipf

    r273 r318  
    112112        list = RemoveFromList(tmp, list  ,";") 
    113113         
     114        // remove some odds and ends... 
     115        tmp = "UpdateQxQy2Mat;" 
     116        tmp += "MakeBSMask;" 
     117        list = RemoveFromList(tmp, list  ,";") 
     118         
    114119        return(list) 
    115120End 
     
    139144Function Sum_HelpButtonProc(ctrlName) : ButtonControl 
    140145        String ctrlName 
    141         DisplayHelpTopic "Sum SANS Models" 
     146        DisplayHelpTopic/Z/K=1 "Sum SANS Models" 
     147        if(V_flag != 0) 
     148                DoAlert 0, "The Sum SANS Models Help file can not be found" 
     149        endif 
    142150End 
    143151 
     
    205213         
    206214        AddModelToStrings("Sum_Model","coef_sum","sum") 
     215         
     216        // additional step to make sure the "helper waves" are the right dimension, in case the user 
     217        // has changed the functions (M. Laver) 
     218        // if it exists here, redimension. otherwise, let the Wrapper create it 
     219        String suffix = "sum" 
     220        if(exists("Hold_"+suffix) == 1) 
     221                Redimension/N=(nParam) $("epsilon_"+suffix),$("Hold_"+suffix) 
     222                Redimension/N=(nParam) $("LoLim_"+suffix),$("HiLim_"+suffix) 
     223        endif 
     224        $("epsilon_"+suffix) = abs(coef_sum*1e-4) + 1e-10                       //default eps is proportional to the coefficients 
    207225End 
    208226 
     
    280298        SetDataFolder root: 
    281299        AddModelToStrings("Smeared_Sum_Model","smear_coef_sum","sum") 
     300         
     301        // additional step to make sure the "helper waves" are the right dimension, in case the user 
     302        // has changed the functions (M. Laver) 
     303        SetDataFolder $("root:"+str) 
     304        String suffix = "sum" 
     305        if(exists("Hold_"+suffix) == 1) 
     306                Redimension/N=(nParam) $("epsilon_"+suffix),$("Hold_"+suffix) 
     307                Redimension/N=(nParam) $("LoLim_"+suffix),$("HiLim_"+suffix) 
     308        endif 
     309        $("epsilon_"+suffix) = abs(smear_coef_sum*1e-4) + 1e-10                 //default eps is proportional to the coefficients 
     310        SetDataFolder root: 
    282311End 
    283312 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/Packages/Wrapper_v40.ipf

    r309 r318  
    9292                case 2: // mouse up 
    9393                        // click code here 
    94                         DisplayHelpTopic "Fit Manager" 
     94                        DisplayHelpTopic/Z/K=1 "Fit Manager" 
     95                        if(V_flag !=0) 
     96                                DoAlert 0,"The Fit Manager Help file could not be found" 
     97                        endif 
    9598                        break 
    9699        endswitch 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/PlotManager_v40.ipf

    r315 r318  
    5757                case 2: // mouse up 
    5858                        // click code here 
    59                         DisplayHelpTopic "Plot Manager" 
     59                        DisplayHelpTopic/K=1/Z "Plot Manager" 
     60                        if(V_flag !=0) 
     61                                DoAlert 0,"The Plot Manager Help file could not be found" 
     62                        endif 
    6063                        break 
    6164        endswitch 
Note: See TracChangeset for help on using the changeset viewer.