Observables Module#

class nexus.observables.VLog[source]#

Bases: DevBase

Methods

__call__(msg[, level, n, time, mem, width])

Call self as a function.

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_required

check_types

check_types_optional

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

decrement

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_optional

get_path

get_required

increment

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

path_exists

random_key

select_random

serial

set

set_high

set_low

set_none

set_optional

set_path

set_verbosity

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

verbosity_levels = high                  int                    low                   int                    none                  int                  #
increment(n=1)[source]#
decrement(n=1)[source]#
set_none()[source]#
set_low()[source]#
set_high()[source]#
set_verbosity(level)[source]#
nexus.observables.set_verbosity(level)[source]#
class nexus.observables.Missing[source]#

Bases: object

Methods

__call__(value)

Call self as a function.

class nexus.observables.AttributeProperties(**kwargs)[source]#

Bases: DevBase

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_required

check_types

check_types_optional

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_optional

get_path

get_required

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

path_exists

random_key

select_random

serial

set

set_optional

set_path

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

class nexus.observables.DefinedAttributeBase(**values)[source]#

Bases: DevBase

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

random_key

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

classmethod set_unassigned_default(default)[source]#
classmethod define_attributes(*other_cls, **attribute_properties)[source]#
classmethod obtain_attributes(super_cls)[source]#
initialize(**values)[source]#
set_default_attributes()[source]#
set_attributes(**values)[source]#
check_attributes(exit=False)[source]#
check_unassigned(value)[source]#
set_attribute(name, value)[source]#
get_attribute(name, value=<nexus.observables.Missing object>, assigned=True)[source]#
has_attribute(name)[source]#
class nexus.observables.Observable(**values)[source]#

Bases: DefinedAttributeBase

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

random_key

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

initialize(**values)[source]#
attribute_definitions = info                  AttributeProperties    initialized           AttributeProperties    structure             AttributeProperties  #
deepcopy_attributes = {'structure'}#
required_attributes = {}#
sublevel_attributes = {'initialized', 'structure'}#
toplevel_attributes = {'info'}#
typed_attributes = {'info', 'initialized', 'structure'}#
unassigned_default = None#
class nexus.observables.ObservableWithComponents(**values)[source]#

Bases: Observable

Attributes:
component_names
default_component_name
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

process_component_name

random_key

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

component_names = None#
default_component_name = None#
process_component_name(name)[source]#
default_component()[source]#
component(name)[source]#
components(names=None)[source]#
nexus.observables.read_eshdf_nofk_data(filename, Ef)[source]#
class nexus.observables.MomentumDistribution(**values)[source]#

Bases: ObservableWithComponents

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

backfold

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

filter_raw_data

get

get_attribute

get_optional

get_path

get_raw_data

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

map_raw_data_onto_grid

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

plot_directional_raw

plot_plane_contours

plot_radial_raw

process_component_name

random_key

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

component_names = ('tot', 'pol', 'u', 'd')#
default_component_name = 'tot'#
get_raw_data()[source]#
filter_raw_data(filter_tol=1e-05, store=True)[source]#
map_raw_data_onto_grid(unfold=False, filter_tol=1e-05)[source]#
backfold()[source]#
plot_plane_contours(quantity=None, origin=None, a1=None, a2=None, a1_range=(0, 1), a2_range=(0, 1), grid_spacing=0.3, unit_in=False, unit_out=False, boundary=True)[source]#
plot_radial_raw(quants='all', kmax=None, fmt='b.', fig=True, show=True)[source]#
plot_directional_raw(kdir, quants='all', kmax=None, fmt='b.', fig=True, show=True, reflect=False)[source]#
attribute_definitions = d                     AttributeProperties    info                  AttributeProperties    initialized           AttributeProperties    kaxes                 AttributeProperties    pol                   AttributeProperties    raw                   AttributeProperties    raw_filter_tol        AttributeProperties    structure             AttributeProperties    tot                   AttributeProperties    u                     AttributeProperties  #
deepcopy_attributes = {'structure'}#
required_attributes = {}#
sublevel_attributes = {'initialized', 'kaxes', 'raw_filter_tol', 'structure'}#
toplevel_attributes = {'d', 'info', 'pol', 'raw', 'tot', 'u'}#
typed_attributes = {'d', 'info', 'initialized', 'kaxes', 'pol', 'raw', 'raw_filter_tol', 'structure', 'tot', 'u'}#
class nexus.observables.MomentumDistributionDFT(**values)[source]#

Bases: MomentumDistribution

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

backfold

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

filter_raw_data

get

get_attribute

get_optional

get_path

get_raw_data

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

map_raw_data_onto_grid

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

plot_directional_raw

plot_plane_contours

plot_radial_raw

process_component_name

random_key

read_eshdf

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

read_eshdf(filepath, E_fermi=None, savefile=None, unfold=False, grid=True)[source]#
attribute_definitions = E_fermi               AttributeProperties    d                     AttributeProperties    info                  AttributeProperties    initialized           AttributeProperties    kaxes                 AttributeProperties    pol                   AttributeProperties    raw                   AttributeProperties    raw_filter_tol        AttributeProperties    structure             AttributeProperties    tot                   AttributeProperties    u                     AttributeProperties  #
deepcopy_attributes = {'structure'}#
required_attributes = {}#
sublevel_attributes = {'E_fermi', 'initialized', 'kaxes', 'raw_filter_tol', 'structure'}#
toplevel_attributes = {'d', 'info', 'pol', 'raw', 'tot', 'u'}#
typed_attributes = {'E_fermi', 'd', 'info', 'initialized', 'kaxes', 'pol', 'raw', 'raw_filter_tol', 'structure', 'tot', 'u'}#
class nexus.observables.MomentumDistributionQMC(**values)[source]#

Bases: MomentumDistribution

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

backfold

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

filter_raw_data

get

get_attribute

get_optional

get_path

get_raw_data

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

map_raw_data_onto_grid

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

obtain_attributes

path_exists

plot_directional_raw

plot_plane_contours

plot_radial_raw

process_component_name

random_key

read_stat_h5

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

read_stat_h5(*files, equil=0, savefile=None)[source]#
class nexus.observables.Density(**values)[source]#

Bases: ObservableWithComponents

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

change_density_units

change_distance_units

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

cumulative_radial_density

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

norm

not_implemented

obj

obtain_attributes

path_exists

plot_radial_density

process_component_name

radial_density

random_key

read_xsf

save_radial_density

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

volume_normalize

write

component_names = ('tot', 'pol', 'u', 'd')#
default_component_name = 'tot'#
read_xsf(filepath, component=None)[source]#
volume_normalize()[source]#
norm(component=None)[source]#
change_distance_units(units)[source]#
change_density_units(units)[source]#
radial_density(component=None, dr=0.01, ntheta=100, rmax=None, single=False, interp_kwargs=None, comps_return=False, species=None)[source]#
cumulative_radial_density(rdfs=None, comps_return=False, **kwargs)[source]#
plot_radial_density(component=None, show=True, cumulative=False, **kwargs)[source]#
save_radial_density(prefix, rdfs=None, **kwargs)[source]#
attribute_definitions = d                     AttributeProperties    density_units         AttributeProperties    distance_units        AttributeProperties    grid                  AttributeProperties    info                  AttributeProperties    initialized           AttributeProperties    pol                   AttributeProperties    raw                   AttributeProperties    structure             AttributeProperties    tot                   AttributeProperties    u                     AttributeProperties  #
deepcopy_attributes = {'structure'}#
required_attributes = {}#
sublevel_attributes = {'density_units', 'distance_units', 'initialized', 'structure'}#
toplevel_attributes = {'d', 'grid', 'info', 'pol', 'raw', 'tot', 'u'}#
typed_attributes = {'d', 'density_units', 'distance_units', 'grid', 'info', 'initialized', 'pol', 'raw', 'structure', 'tot', 'u'}#
class nexus.observables.ChargeDensity(**values)[source]#

Bases: Density

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

change_density_units

change_distance_units

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

cumulative_radial_density

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

norm

not_implemented

obj

obtain_attributes

path_exists

plot_radial_density

process_component_name

radial_density

random_key

read_xsf

save_radial_density

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

volume_normalize

write

class nexus.observables.EnergyDensity(**values)[source]#

Bases: Density

Attributes:
unassigned_default

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

change_density_units

change_distance_units

check_attributes

check_required

check_types

check_types_optional

check_unassigned

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

component

components

copy

copy_from

copy_to

cumulative_radial_density

data_repr

default_component

define_attributes

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_attribute

get_optional

get_path

get_required

has_attribute

initialize

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

norm

not_implemented

obj

obtain_attributes

path_exists

plot_radial_density

process_component_name

radial_density

random_key

read_xsf

save_radial_density

select_random

serial

set

set_attribute

set_attributes

set_default_attributes

set_optional

set_path

set_unassigned_default

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

volume_normalize

write

class nexus.observables.StatFile(filepath=None, **read_kwargs)[source]#

Bases: DevBase

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_required

check_types

check_types_optional

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

cls

condense_name

copy

copy_from

copy_to

data_repr

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_optional

get_path

get_required

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

observable_groups

path_exists

random_key

read

select_random

serial

set

set_optional

set_path

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

scalars = {'ElecElec', 'IonIon', 'KEcorr', 'Kinetic', 'LocalECP', 'LocalEnergy', 'LocalEnergy_sq', 'LocalPotential', 'MPC', 'NonLocalECP'}#
observable_aliases = momentum_distribution  str                    nofk                  str                  #
observable_classes = momentum_distribution  type                 #
observable_class_to_stat_group = MomentumDistributionQMC  str                  #
read(filepath, observables='all')[source]#
condense_name(name)[source]#
alias = 'nofk'#
cls#

alias of MomentumDistributionQMC

name = 'momentum_distribution'#
observable = 'momentum_distribution'#
observable_groups(observable, single=False)[source]#