instrument

sans.calculator.instrument

This module is a small tool to allow user to control instrumental parameters

class sans.calculator.instrument.Aperture

Bases: object

An object class that defines the aperture variables

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01A48250>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.calculator.instrument'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

set_sample_distance()

Set the sample aperture distance

set_sample_size()

Set the sample aperture size

set_source_size()

Set the source aperture size

class sans.calculator.instrument.Detector

Bases: object

An object class that defines the detector variables

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01A3DEF0>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.calculator.instrument'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

set_distance()

Set the detector distance

set_pix_size()

Set the detector pix_size

set_size()

Set the detector size

class sans.calculator.instrument.Neutron

Bases: object

An object that defines the wavelength variables

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01A4F410>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.calculator.instrument'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

get_band()

To get the wavelength band

get_default_spectrum()

get default spectrum

get_intensity()

To get the value of intensity

get_mass()

To get the neutron mass

get_ramdom_value()

To get the value of wave length

get_spectrum()

To get the wavelength spectrum

get_wavelength()

To get the value of wavelength

get_wavelength_spread()

To get the value of wavelength spread

plot_spectrum()

To plot the wavelength spactrum : requirment: matplotlib.pyplot

set_band()

To set the wavelength band

Parameters:band – array of [min, max]
set_full_band()

set band to default value

set_intensity()

Sets the intensity in counts/sec

set_mass()

Sets the wavelength

set_spectrum()

Set spectrum

Parameters:spectrum – numpy array
set_wavelength()

Sets the wavelength

set_wavelength_spread()

Sets the wavelength spread

setup_spectrum()

To set the wavelength spectrum, and intensity, assumes wavelength is already within the spectrum

class sans.calculator.instrument.Sample

Bases: object

An object class that defines the sample variables

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01A4F530>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.calculator.instrument'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

set_distance()

Set the sample distance

set_size()

Set the sample size

set_thickness()

Set the sample thickness

class sans.calculator.instrument.TOF

Bases: sans.calculator.instrument.Neutron

TOF: make list of wavelength and wave length spreads

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01A5B830>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()

Init

__module__ = 'sans.calculator.instrument'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

get_band()

To get the wavelength band

get_default_spectrum()

get default spectrum

get_intensity()

To get the value of intensity

get_intensity_list()

get list of the intensity wrt wavelength_list

get_mass()

To get the neutron mass

get_ramdom_value()

To get the value of wave length

get_spectrum()

To get the wavelength spectrum

get_wave_list()

Get wavelength and wavelength_spread list

get_wavelength()

To get the value of wavelength

get_wavelength_spread()

To get the value of wavelength spread

plot_spectrum()

To plot the wavelength spactrum : requirment: matplotlib.pyplot

set_band()

To set the wavelength band

Parameters:band – array of [min, max]
set_full_band()

set band to default value

set_intensity()

Sets the intensity in counts/sec

set_mass()

Sets the wavelength

set_spectrum()

Set spectrum

Parameters:spectrum – numpy array
set_wave_list()

Set wavelength list

Parameters:wavelength – list of wavelengths
set_wave_spread_list()

Set wavelength_spread list

Parameters:wavelength_spread – list of wavelength spreads
set_wavelength()

Sets the wavelength

set_wavelength_spread()

Sets the wavelength spread

setup_spectrum()

To set the wavelength spectrum, and intensity, assumes wavelength is already within the spectrum

sans.calculator.instrument.validate()

Check if the value is folat > 0.0

Return value:True / False

Table Of Contents

Previous topic

Reference

Next topic

kiessig_calculator

This Page