flatspin.data
Data management
Module Contents
Classes
Functions
|
|
|
match column pattern from available columns |
|
match column patterns |
|
Parse column names at the top of a CSV file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Crop array X along one or more axes |
|
Apply a function over a rolling window of X |
|
Filter dataframe by key=value or range key=start:stop |
|
|
|
Convert number x to array of bits |
|
Convert bit array a to number |
|
Process vectors on a grid |
|
Load output vectors from dataset, with optional post-processing |
Attributes
- flatspin.data.col_group(x)
- flatspin.data.match_column(pattern, columns)
match column pattern from available columns m -> (mx, my, mz) m.region*x
- flatspin.data.match_columns(patterns, columns)
match column patterns
- flatspin.data.csv_columns(filename)
Parse column names at the top of a CSV file
- flatspin.data.save_csv(df, filename)
- flatspin.data.read_csv(filename, index_col=None)
- flatspin.data.save_hdf(df, filename)
- flatspin.data.read_hdf(filename)
- flatspin.data.hdf_columns(filename)
- flatspin.data.read_npy(filename)
- flatspin.data.save_npy(df, filename)
- flatspin.data.npy_columns(filename)
- flatspin.data.read_npz(filename)
- flatspin.data.save_npz(df, filename)
- flatspin.data.npz_columns(filename)
- flatspin.data.table_formats
- flatspin.data.table_extensions
- flatspin.data.archive_formats = ['npz', 'hdf']
- flatspin.data.table_patterns
- flatspin.data.archive_key(filename)
- flatspin.data.get_format(filename)
- flatspin.data.is_archive_format(fmt)
- flatspin.data.is_archive(filename)
- flatspin.data.is_tablefile(filename)
- flatspin.data.list_dir(filename)
- flatspin.data.list_npz(filename)
- flatspin.data.list_hdf(filename)
- flatspin.data.listfiles(filename)
- flatspin.data.to_table(data)
- flatspin.data.match_any(name, patterns)
- flatspin.data.read_table(filename, index_col=None, **kwargs)
- flatspin.data.save_table(data, filename)
- flatspin.data.table_columns(filename)
- flatspin.data.read_tables(filenames, index_col=None)
- flatspin.data.read_geometry(filename='geometry.csv')
- flatspin.data.read_vectors(filenames, quantity='mag', t=None)
- flatspin.data.crop(X, crop, axis=- 1)
Crop array X along one or more axes crop is a tuple (before, after) for each axis to crop axis specifies which axis to start cropping from
- flatspin.data.rolling_window(X, win_shape, step=1, method='sum')
Apply a function over a rolling window of X
- flatspin.data.filter_df(df, **kwargs)
Filter dataframe by key=value or range key=start:stop
- class flatspin.data.Dataset(index=None, params={}, info={}, basepath=None)
Bases:
object
- property name(self)
- __getitem__(self, i)
- __repr__(self)
Return repr(self).
- __str__(self)
Return str(self).
- keys(self)
- items(self)
- iterrows(self)
- __iter__(self)
- __len__(self)
- __eq__(self, other)
Return self==value.
- subset(self, i)
- filter(self, **kwargs)
- groupby(self, key)
- sort_values(self, column)
- row(self, row=0)
- id(self, row=0)
- static read(basepath)
- save(self, basepath=None)
- file(self, filename)
- files(self, patterns=None, squash=True)
- tablefile(self, tablename, squash=True)
- tablefiles(self, patterns=None, squash=True)
- flatspin.data.digitize(X, threshold=0)
- flatspin.data.bit_array(x, n_bits)
Convert number x to array of bits
- flatspin.data.array_bit(a)
Convert bit array a to number
- flatspin.data.vector_grid(pos, vectors, grid_size=None, crop_width=None, win_shape=None, win_step=None, normalize=True, return_grid=False)
Process vectors on a grid
- flatspin.data.load_output(dataset, quantity, t=None, grid_size=None, crop_width=None, win_shape=None, win_step=None, flatten=True)
Load output vectors from dataset, with optional post-processing