Ignore:
Timestamp:
Jul 15, 2008 11:19:38 AM (15 years ago)
Author:
srkline
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Invariant/Invariant_v40.ipf

    r379 r393  
    5050         
    5151        Printf "The model invariant is %g A^-3 cm^-1\r\r",inv 
     52End 
     53 
     54// for testing - compare to the "perfect" value. This macro 
     55// calculates the invariant based on the contrast and volume fraction 
     56// - the extrapolated/integrated value should match this... 
     57Macro SolveForVolumeFraction(invariant,delta_rho) 
     58        Variable invariant,delta_rho=6e-6 
     59        // delta_rho [=] 1/A^2 
     60        Variable phi1,phi2,arg 
     61         
     62        arg = 1 - 4*invariant*(1e-8)/2/pi/pi/delta_rho/delta_rho 
     63        phi1 = (1 - sqrt(arg))/2 
     64        phi2 = (1 + sqrt(arg))/2 
     65         
     66        Printf "The two solutions for phi are: %8.6f\t and %8.6f\r\r",phi1,phi2 
    5267End 
    5368 
Note: See TracChangeset for help on using the changeset viewer.