source: sasview/src/sas/sascalc/invariant/invariant_mapper.py @ 2ab812d

Last change on this file since 2ab812d was b699768, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Initial commit of the refactored SasCalc? module.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1"""
2This module is a wrapper to a map function. It allows to loop through
3different invariant objects to call the same function
4"""
5
6
7def get_qstar(inv, extrapolation=None):
8    """
9    Get invariant value (Q*)
10    """
11    return inv.get_qstar(extrapolation)
12
13def get_qstar_with_error(inv, extrapolation=None):
14    """
15    Get invariant value with uncertainty
16    """
17    return inv.get_qstar_with_error(extrapolation)
18
19def get_volume_fraction(inv, contrast, extrapolation=None):
20    """
21    Get volume fraction
22    """
23    return inv.get_volume_fraction(contrast, extrapolation)
24
25def get_volume_fraction_with_error(inv, contrast, extrapolation=None):
26    """
27    Get volume fraction with uncertainty
28    """
29    return inv.get_volume_fraction_with_error(contrast,
30                                                    extrapolation)
31
32def get_surface(inv, contrast, porod_const, extrapolation=None):
33    """
34    Get surface with uncertainty
35    """
36    return inv.get_surface(contrast=contrast,
37                                      porod_const=porod_const,
38                                      extrapolation=extrapolation)
39
40def get_surface_with_error(inv, contrast, 
41                           porod_const, extrapolation=None):
42    """
43    Get surface with uncertainty
44    """
45    return inv.get_surface_with_error(contrast=contrast,
46                                      porod_const=porod_const,
47                                      extrapolation=extrapolation)
48
Note: See TracBrowser for help on using the repository browser.