binoculars package

Submodules

binoculars.backend module

class binoculars.backend.InputBase(config)[source]

Bases: binoculars.util.ConfigurableObject

Generate and process Job()s.

Note: there is no guarantee that generate_jobs() and process_jobs() will be called on the same instance, not even in the same process or on the same computer!

generate_jobs(command)[source]

Receives command from user, yields Job() instances

get_destination_options(command)[source]

Receives the same command as generate_jobs(), but returns dictionary that will be used to .format() the dispatcher:destination configuration value.

parse_config(config)[source]
process_job(job)[source]

Receives a Job() instance, yields (intensity, args_to_be_sent_to_a_Projection_instance)

Job()s could have been pickle’d and distributed over a cluster

class binoculars.backend.Job(**kwargs)[source]

Bases: object

weight = 1.0
class binoculars.backend.ProjectionBase(config)[source]

Bases: binoculars.util.ConfigurableObject

get_axis_labels()[source]
parse_config(config)[source]
project(*args)[source]
binoculars.backend.get_dispatcher(config, main, default=None)[source]
binoculars.backend.get_input(config, default=None)[source]
binoculars.backend.get_projection(config, default=None)[source]

binoculars.dispatcher module

class binoculars.dispatcher.Destination[source]

Bases: object

config = None
filename = None
final_filenames()[source]
limits = None
opts: Dict[Any, Any] = {}
overwrite = None
retrieve()[source]
set_config(conf)[source]
set_final_filename(filename, overwrite)[source]
set_final_options(opts)[source]
set_limits(limits)[source]
set_memory()[source]
set_tmp_filename(filename)[source]
store(verse)[source]
type = None
value = None
class binoculars.dispatcher.DispatcherBase(config, main)[source]

Bases: binoculars.util.ConfigurableObject

has_specific_task()[source]
parse_config(config)[source]
process_jobs(jobs)[source]
send(verses)[source]
sum(results)[source]
class binoculars.dispatcher.Local(config, main)[source]

Bases: binoculars.dispatcher.ReentrantBase

actions: Tuple[str, ] = ('user', 'job')
parse_config(config)[source]
prepare_config(job)[source]
process_jobs(jobs)[source]
run_specific_task(command)[source]
sum(results)[source]
class binoculars.dispatcher.Oar(config, main)[source]

Bases: binoculars.dispatcher.ReentrantBase

actions: Tuple[str, ] = ('user', 'process')
oar_cleanup(jobs)[source]
oarstat(jobid)[source]
oarsub(*args)[source]
oarwait(jobs, remaining=0)[source]
parse_config(config)[source]
process_jobs(jobs)[source]
run_specific_task(command)[source]
static subprocess_run(*command)[source]
sum(results)[source]
class binoculars.dispatcher.ReentrantBase(config, main)[source]

Bases: binoculars.dispatcher.DispatcherBase

actions: Tuple[str, ] = ('user',)
has_specific_task()[source]
parse_config(config)[source]
run_specific_task(command)[source]
class binoculars.dispatcher.SingleCore(config, main)[source]

Bases: binoculars.dispatcher.DispatcherBase

process_jobs(jobs)[source]
sum(results)[source]

binoculars.errors module

exception binoculars.errors.BackendError[source]

Bases: binoculars.errors.ExceptionBase

exception binoculars.errors.CommunicationError[source]

Bases: binoculars.errors.ExceptionBase

exception binoculars.errors.ConfigError[source]

Bases: binoculars.errors.ExceptionBase

exception binoculars.errors.ExceptionBase[source]

Bases: Exception

exception binoculars.errors.FileError[source]

Bases: binoculars.errors.ExceptionBase

exception binoculars.errors.HDF5FileError[source]

Bases: binoculars.errors.FileError

exception binoculars.errors.SubprocessError[source]

Bases: binoculars.errors.ExceptionBase

binoculars.errors.addmessage(args, errormsg)[source]

binoculars.fit module

class binoculars.fit.AutoDimensionFit(space, guess=None)[source]

Bases: binoculars.fit.FitBase

class binoculars.fit.FitBase(space, guess=None)[source]

Bases: object

fitdata = None
guess = None
parameters = None
result = None
summary = None
class binoculars.fit.Gaussian1D(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
class binoculars.fit.Lorentzian(space, guess=None)[source]

Bases: binoculars.fit.AutoDimensionFit

dimensions = {1: <class 'binoculars.fit.Lorentzian1D'>, 2: <class 'binoculars.fit.PolarLorentzian2D'>}
class binoculars.fit.Lorentzian1D(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.Lorentzian1DNoBkg(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.Lorentzian2D(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.Lorentzian2Dnobkg(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.PeakFitBase(space, guess=None, loc=None)[source]

Bases: binoculars.fit.FitBase

class binoculars.fit.PolarLorentzian2D(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
integrate_signal()[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.PolarLorentzian2Dnobkg(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
class binoculars.fit.Voigt1D(space, guess=None, loc=None)[source]

Bases: binoculars.fit.PeakFitBase

static func(grid, params)[source]
set_guess(maximum, argmax, linparams)[source]
binoculars.fit.get_class_by_name(name)[source]
binoculars.fit.rot2d(x, y, th)[source]
binoculars.fit.rot3d(x, y, z, th, ph)[source]

binoculars.main module

class binoculars.main.Main(config, command)[source]

Bases: object

clone_config()[source]
classmethod from_args(args)[source]
classmethod from_object(config, command)[source]
get_reentrant()[source]
process_job(job)[source]
run(command)[source]
class binoculars.main.Split(config, command)[source]

Bases: binoculars.main.Main

process_job(job)[source]
run()[source]
binoculars.main.multiprocessing_main(xxx_todo_changeme)[source]

note the double parenthesis for map() convenience

binoculars.main.parse_args(args)[source]
binoculars.main.parse_commandline_config_option(s)[source]

binoculars.plot module

class binoculars.plot.DraggableColorbar(cbar, mappable)[source]

Bases: object

connect()[source]
disconnect()[source]
key_press(event)[source]
on_motion(event)[source]
on_press(event)[source]
on_release(event)[source]
binoculars.plot.get_clipped_norm(data, clipping=0.0, log=True)[source]
binoculars.plot.plot(space: binoculars.space.Space, fig: matplotlib.figure.Figure, ax: matplotlib.axes._axes.Axes, log: bool = True, loglog: bool = False, clipping: float = 0.0, fit: Optional[bool] = None, norm: Optional[float] = None, colorbar: bool = True, labels: bool = True, interpolation: str = 'nearest', **plotopts) → List[matplotlib.lines.Line2D][source]

binoculars.space module

class binoculars.space.Axes(axes)[source]

Bases: object

Luxurious tuple of Axis objects.

property dimension
classmethod fromarray(arr)[source]
classmethod fromfile(filename: str)binoculars.space.Axes[source]
index(obj: Union[binoculars.space.Axis, int, str]) → int[source]
property memory_size
property npoints
restricted_key(key)[source]
toarray()[source]
tofile(filename)[source]
class binoculars.space.Axis(min, max, res, label=None)[source]

Bases: object

Represents a single dimension finite discrete grid centered at 0.

Important attributes: min lower bound max upper bound res step size / resolution label human-readable identifier

min, max and res are floats, but internally only integer operations are used. In particular min = imin * res, max = imax * res

get_index(value: Union[float, slice, numpy.ndarray]) → Union[int, slice, numpy.ndarray][source]
is_compatible(other)[source]
property max
property min
rebin(factor)[source]
rebound(min, max)[source]
restrict(value: Union[float, slice]) → Union[float, slice][source]
restrict_slice(value: slice) → slice[source]
class binoculars.space.EmptySpace(config=None, metadata=None)[source]

Bases: object

Convenience object for sum() and friends. Treated as zero for addition. Does not share a base class with Space for simplicity.

tofile(filename)[source]

Store EmptySpace in HDF5 file.

class binoculars.space.EmptyVerse[source]

Bases: object

Convenience object for sum() and friends. Treated as zero for addition.

property dimension
spaces = [EmptySpace]
class binoculars.space.Multiverse(spaces)[source]

Bases: object

A collection of spaces with basic support for addition. Only to be used when processing data. This makes it possible to process multiple limit sets in a combination of scans

property dimension
classmethod fromfile(file)[source]

Load Multiverse from HDF5 file.

tofile(filename)[source]
class binoculars.space.Space(axes, config=None, metadata=None)[source]

Bases: object

Main data-storing object in BINoculars. Data is represented on an n-dimensional rectangular grid. Per grid point, the number of photons (~ intensity) and the number of original data points (pixels) contribution is stored.

Important attributes:

axes Axes instances describing range and stepsizes of each of the dimensions photons n-dimension numpy float array, total intensity per grid point contribitions n-dimensional numpy integer array, number of original datapoints (pixels) per grid point dimension n

argmax()[source]

Returns data coordinates of grid point with maximum intensity.

property config

util.ConfigFile instance describing configuration file used to create this Space instance

copy()[source]

Returns a copy of self. Numpy data is not shared, but the Axes object is.

property dimension
classmethod from_image(resolutions, labels, coordinates, intensity, weights, limits=None)[source]

Create Space from image data.

resolutions n-tuple of axis resolutions labels n-tuple of axis labels coordinates n-tuple of data coordinate arrays intensity data intensity array

classmethod fromfile(file: str, key: Optional[Sequence[binoculars.space.Space.slice]] = None)binoculars.space.Space[source]

Load Space from HDF5 file.

file filename string or h5py.Group instance key sliced (subset) loading, should be an n-tuple of slice()s in data coordinates

get()[source]

Returns normalized photon count.

get_grid() → Tuple[numpy.ndarray][source]

Returns the data coordinates of each grid point, as n-tuple of n-dimensinonal arrays. Basically numpy.mgrid() in data coordinates.

get_key(key: Union[float, slice, Tuple[Union[float, slice, numpy.ndarray], ], List[Union[float, slice, numpy.ndarray]]]) → Tuple[Union[int, slice, numpy.ndarray], ][source]

Convert the n-dimensional interval described by key (as used by e.g. __getitem__()) from data coordinates to indices.

get_masked() → numpy.ma.core.MaskedArray[source]

Returns photons/contributions, but with divide-by-zero’s masked out.

get_variance()[source]
max(axis=None)[source]

Returns maximum intensity.

property memory_size

Returns approximate memory consumption of this Space. Only considers size of .photons and .contributions, does not take into account the overhead.

property metadata

util.MetaData instance describing metadata used to create this Space instance

property npoints
process_image(coordinates, intensity, weights)[source]

Load image data into Space.

coordinates n-tuple of data coordinate arrays intensity data intensity array weights weights array, supply numpy.ones_like(intensity) for equal weights

project(axis: Union[str, int], *more_axes)binoculars.space.Space[source]

Reduce dimensionality of Space by projecting onto ‘axis’. All data (photons, contributions) is summed along this axis.

axis the label of the axis or the index *more_axis also project on these axes

rebin(resolutions)[source]

Change bin size.

resolution n-tuple of floats, new resolution of each axis

reorder(labels)[source]

Change order of axes.

slice(axis, key)[source]

Single-axis slice.

axis label or index of axis to slice key something like slice(lower_data_range, upper_data_range)

tofile(filename)[source]

Store Space in HDF5 file.

tovti(filename: str) → None[source]
transform_coordinates(resolutions, labels, transformation)[source]
trim()[source]

Reduce total size of Space by trimming zero-contribution data points on the boundaries.

binoculars.space.axis_offset(space, label, offset)[source]
binoculars.space.bkgsubtract(space, bkg)[source]
binoculars.space.chunked_sum(verses: Iterable[binoculars.space.Multiverse], chunksize=10) → Union[binoculars.space.EmptyVerse, binoculars.space.Multiverse][source]

Calculate sum of iterable of Multiverse instances. Creates intermediate sums to avoid growing a large space at every summation.

verses iterable of Multiverse instances chunksize number of Multiverse instances in each intermediate sum

binoculars.space.dstack(spaces, dindices, dlabel, dresolution)[source]
binoculars.space.get_axis_values(axes, axis, resolution=None) → numpy.ndarray[source]
binoculars.space.get_bins(ax: binoculars.space.Axis, resolution: float) → numpy.ndarray[source]
binoculars.space.iterate_over_axis(space, axis, resolution=None)[source]
binoculars.space.iterate_over_axis_keys(axes, axis, resolution=None)[source]
binoculars.space.make_compatible(spaces)[source]
binoculars.space.silence_numpy_errors()[source]

Silence numpy warnings about zero division. Normal usage of Space() will trigger these warnings.

binoculars.space.sum(spaces)[source]

Calculate sum of iterable of Space instances.

binoculars.space.sum_onto(a, axis)[source]

Numpy convenience. Project all dimensions of an array onto an axis, i.e. apply sum() to all axes except the one given.

binoculars.space.union_axes(axes)[source]
binoculars.space.union_unequal_axes(axes)[source]
binoculars.space.verse_sum(verses: Generator[binoculars.space.Multiverse, None, None])binoculars.space.Multiverse[source]

binoculars.util module

class binoculars.util.ConfigFile(origin='n/a', command=[])[source]

Bases: binoculars.util.MetaBase

classmethod fromfile(filename)[source]
classmethod fromtxtfile(filename, command=[], overrides=[])[source]
tofile(filename)[source]
totxtfile(filename)[source]
class binoculars.util.ConfigSection(**kwargs)[source]

Bases: object

copy()[source]
class binoculars.util.ConfigSectionGroup(origin='n/a')[source]

Bases: object

class binoculars.util.ConfigurableObject(config)[source]

Bases: object

parse_config(config)[source]
class binoculars.util.MetaBase(label=None, section=None)[source]

Bases: object

add_section(label, section=None)[source]
copy()[source]
classmethod fromserial(s)[source]
serialize()[source]
class binoculars.util.MetaData[source]

Bases: object

add_dataset(dataset)[source]
classmethod fromfile(filename)[source]
classmethod fromserial(s)[source]
serialize()[source]
tofile(filename)[source]
class binoculars.util.OrderedOperation(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

binoculars.util.argparse_common_arguments(parser, *args)[source]
binoculars.util.as_string(text)[source]
binoculars.util.atomic_write(filename)[source]

Atomically write data into ‘filename’ using a temporary file and os.rename()

Rename on success, clean up on failure (any exception).

Example: with atomic_write(filename) as tmpfile

with open(tmpfile, ‘w’) as fp:

fp.write(…)

binoculars.util.best_effort_atomic_rename(src, dest)[source]
binoculars.util.chunk_slicer(count, chunksize)[source]

yields slice() objects that split an array of length ‘count’ into equal sized chunks of at most ‘chunksize’

binoculars.util.cluster_jobs(jobs, target_weight)[source]
binoculars.util.cluster_jobs2(jobs, target_weight)[source]

Taking the first n jobs that together add up to target_weight. Here as opposed to cluster_jobs the total number of jobs does not have to be known beforehand

binoculars.util.filename_enumerator(filename, start=0)[source]
binoculars.util.find_unused_filename(filename)[source]
binoculars.util.find_unused_label(label, labellist)[source]
binoculars.util.format_bytes(bytes)[source]
binoculars.util.get_backend_configkeys(modname, classname)[source]
binoculars.util.get_backends()[source]
binoculars.util.get_base(modname, base)[source]
binoculars.util.get_configkeys(cls)[source]
binoculars.util.get_dispatcher_configkeys(classname)[source]
binoculars.util.get_dispatchers()[source]
binoculars.util.get_input_configkeys(modname, classname)[source]
binoculars.util.get_inputs(module)[source]
binoculars.util.get_projection_configkeys(modname, classname)[source]
binoculars.util.get_projections(module)[source]
binoculars.util.get_python_executable()[source]
binoculars.util.grouper(iterable, n)[source]
binoculars.util.handle_ordered_operations(space, args, auto3to2=False)[source]
binoculars.util.label_enumerator(label, start=0)[source]
binoculars.util.limit_to_filelabel(s)[source]
binoculars.util.loop_delayer(delay)[source]

Delay a loop such that it runs at most once every ‘delay’ seconds. Usage example: delay = loop_delayer(5) while some_condition:

next(delay) do_other_tasks

binoculars.util.open_h5py(fn, mode)[source]
binoculars.util.packet_slicer(length, size=1024)[source]
binoculars.util.parse_bool(s)[source]
binoculars.util.parse_configcode(line)[source]
binoculars.util.parse_float(config, option, default=None)[source]
binoculars.util.parse_multi_range(s)[source]
binoculars.util.parse_pairs(s)[source]
binoculars.util.parse_range(r)[source]
binoculars.util.parse_transform_args(transform)[source]
binoculars.util.parse_tuple(s, length=None, type=<class 'str'>)[source]
binoculars.util.pickle_load(fileobj)[source]
binoculars.util.register_python_executable(scriptname)[source]
binoculars.util.serialize(space, command)[source]
binoculars.util.socket_recieve(RequestHandler)[source]
binoculars.util.socket_send(ip, port, mssg)[source]
binoculars.util.space_to_edf(space, filename)[source]
binoculars.util.space_to_txt(space, filename)[source]
binoculars.util.status(line, eol=False)[source]

Prints a status line to sys.stdout, overwriting the previous one. Set eol to True to append a newline to the end of the line

binoculars.util.statuscl()[source]

Clears the status line, shortcut for status(‘’)

binoculars.util.statuseol()[source]

Starts a new status line, keeping the previous one intact

binoculars.util.statusnl(line)[source]

Shortcut for status(…, eol=True)

binoculars.util.transformation_from_expressions(space, exprs)[source]
binoculars.util.uniqid()[source]
binoculars.util.wait_for_file(file, timeout=None)[source]
binoculars.util.wait_for_files(filelist, timeout=None)[source]

Wait until the files in ‘filelist’ have appeared, for a maximum of ‘timeout’ seconds. Returns True on success, False on timeout.

binoculars.util.yield_when_exists(filelist, timeout=None)[source]

Wait for files in ‘filelist’ to appear, for a maximum of ‘timeout’ seconds, yielding them in arbitrary order as soon as they appear. If ‘filelist’ is a set, it will be modified in place, and on timeout it will contain the files that have not appeared yet.

binoculars.util.zpi_load(filename)[source]
binoculars.util.zpi_save(obj, filename)[source]

Module contents

binoculars.fitspace(space, function, guess=None)[source]

fit the space data.

Parameters space: binoculars space function: list

a string with the name of the desired function. supported are: lorentzian (automatically selects 1d or 2d), gaussian1d and voigt1d

guess: list

a list of length N with the resolution per label

Returns A binoculars fit object.

Examples: >>> fit = binoculars.fitspace(space, ‘lorentzian’) >>> print(fit.summary)

I: 1.081e-07 +/- inf loc: 0.3703 +/- inf gamma: 0.02383 +/- inf slope: 0.004559 +/- inf offset: -0.001888 +/- inf

>>> parameters = fit.parameters
>>> data = fit.fitdata
>>> binoculars.plotspace(space, fit = data)
binoculars.info(filename)[source]

Explore the file without loading the file, or after loading the file

Parameters filename: filename or space

Examples: >>> print binoculars.info(‘test.hdf5’) Axes (3 dimensions, 46466628 points, 531.0 MB) {

Axis H (min=-0.1184, max=0.0632, res=0.0008, count=228) Axis K (min=-1.1184, max=-0.9136, res=0.0008, count=257) Axis L (min=0.125, max=4.085, res=0.005, count=793)

} ConfigFile{

[dispatcher] [projection] [input]

} origin = test.hdf5 >>> space = binoculars.load(‘test.hdf5’) >>> print binoculars.info(space) Axes (3 dimensions, 46466628 points, 531.0 MB) {

Axis H (min=-0.1184, max=0.0632, res=0.0008, count=228) Axis K (min=-1.1184, max=-0.9136, res=0.0008, count=257) Axis L (min=0.125, max=4.085, res=0.005, count=793)

} ConfigFile{

[dispatcher] [projection] [input]

} origin = test.hdf5

binoculars.load(filename, key=None)[source]

Parameters filename: string

Only hdf5 files are acceptable

key: a tuple with slices in as much dimensions as the space is

Returns A binoculars space

Examples: >>> space = binoculars.load(‘test.hdf5’) >>> space Axes (3 dimensions, 2848 points, 33.0 kB) {

Axis qx (min=-0.01, max=0.0, res=0.01, count=2) Axis qy (min=-0.04, max=-0.01, res=0.01, count=4) Axis qz (min=0.48, max=4.03, res=0.01, count=356)

}

binoculars.plotspace(space, log=True, clipping=0.0, fit=None, norm=None, colorbar=True, labels=True, **plotopts)[source]

plots a space with the correct axes. The space can be either one or two dimensinal.

Parameters space: binoculars space

the space containing the data that needs to be plotted

log: bool

axes or colorscale logarithmic

clipping: 0 < float < 1

cuts a lowest and highst value on the color scale

fit: numpy.ndarray

same shape and the space. If one dimensional the fit will be overlayed.

norm: matplotlib.colors

object defining the colorscale

colorbar: bool

show or not show the colorbar

labels: bool

show or not show the labels

plotopts: keyword arguments

keywords that will be accepted by matplotlib.pyplot.plot or matplotlib.pyplot.imshow

Examples: >>> space Axes (3 dimensions, 2848 points, 33.0 kB) {

Axis qx (min=-0.01, max=0.0, res=0.01, count=2) Axis qy (min=-0.04, max=-0.01, res=0.01, count=4) Axis qz (min=0.48, max=4.03, res=0.01, count=356)

} >>> binoculars.plotspace(‘test.hdf5’)

binoculars.run(args)[source]

Parameters args: string

String as if typed in terminal. The string must consist of the location of the configuration file and the command for specifying the jobs that need to be processed. All additonal configuration file overides can be included

Returns A tuple of binoculars spaces

Examples: >>> space = binoculars.run(‘config.txt 10’) >>> space[0] Axes (3 dimensions, 2848 points, 33.0 kB) {

Axis qx (min=-0.01, max=0.0, res=0.01, count=2) Axis qy (min=-0.04, max=-0.01, res=0.01, count=4) Axis qz (min=0.48, max=4.03, res=0.01, count=356)

}

binoculars.save(filename, space)[source]

Save a space to file

Parameters filename: string

filename to which the data is saved. ‘.txt’, ‘.hdf5’ are supported.

space: binoculars space

the space containing the data that needs to be saved

Examples: >>> space Axes (3 dimensions, 2848 points, 33.0 kB) {

Axis qx (min=-0.01, max=0.0, res=0.01, count=2) Axis qy (min=-0.04, max=-0.01, res=0.01, count=4) Axis qz (min=0.48, max=4.03, res=0.01, count=356)

} >>> binoculars.save(‘test.hdf5’, space)

binoculars.transform(space, labels, resolutions, exprs)[source]

transformation of the coordinates.

Parameters space: binoculars space labels: list

a list of length N with the labels

resolutions: list

a list of length N with the resolution per label

exprs: list

a list of length N with strings containing the expressions that will be evaluated. all numpy funtions can be called without adding ‘numpy.’ to the functions.

Returns A binoculars space of dimension N with labels and resolutions specified in the input

Examples: >>> space = binoculars.load(‘test.hdf5’) >>> space Axes (3 dimensions, 2848 points, 33.0 kB) {

Axis qx (min=-0.01, max=0.0, res=0.01, count=2) Axis qy (min=-0.04, max=-0.01, res=0.01, count=4) Axis qz (min=0.48, max=4.03, res=0.01, count=356)

} >>> newspace = binoculars.transform(space, [‘twotheta’], [0.003], [‘2 * arcsin(0.51 * (sqrt(qx**2 + qy**2 + qz**2) / (4 * pi)) / (pi * 180))’]) # noqa >>> newspace Axes (1 dimensions, 152 points, 1.0 kB) {

Axis twotheta (min=0.066, max=0.519, res=0.003, count=152)

}