Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ All other dependencies (e.g. `numpy` etc.) are required by packages listed here,
A note on [`enlib`](https://github.com/amaurea/enlib): all users need access to the top-level python modules. This is achieved just by adding the repo to your `PYTHONPATH`. **If you are only drawing new simulations or loading existing products from disk, you do not need to do anything else.** Only if you are generating new noise models, you **may** also try compiling the library `array_ops`. This is done via `make array_ops` executed from within the top-level directory. Please see the enlib docs for more info on how to do this on your system. We have had success using an up-to-date intel `c` compiler with intel `mkl` loaded in your environment, if available. **However, enlib.array_ops is not necessary to generate new noise models.** If the `array_ops` module isn't compiled, `mnms` will fallback to using `optweight` to help make models.

## Installation
Clone this repo and the `sofind` repo. `mnms` and `sofind` are install-time circular dependencies. Thus, they need to be installed in the same call to pip:
Clone this repo and install it via pip:
```shell
$ pip install path/to/mnms path/to/sofind
$ pip install path/to/mnms
```
or
```shell
$ pip install -e path/to/mnms -e path/to/sofind
$ pip install -e path/to/mnms
```
to see changes to source code automatically updated in your environment. To check the installation, run tests from within `path/to/mnms`:

Expand Down
21 changes: 15 additions & 6 deletions mnms/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class Params(ABC):
def __init__(self, *args, data_model_name=None, subproduct=None,
maps_product=None, maps_subproduct='default',
enforce_equal_qid_kwargs=None, calibrated=False,
differenced=True, srcfree=True, iso_filt_method=None,
ivar_filt_method=None, filter_kwargs=None, ivar_fwhms=None,
ivar_lmaxs=None, masks_subproduct=None, mask_est_name=None,
mask_est_edgecut=0, mask_est_apodization=0,
mask_obs_name=None, mask_obs_edgecut=0,
calibrations_subproduct=None, differenced=True, srcfree=True,
iso_filt_method=None, ivar_filt_method=None,
filter_kwargs=None, ivar_fwhms=None, ivar_lmaxs=None,
masks_subproduct=None, mask_est_name=None, mask_est_edgecut=0,
mask_est_apodization=0, mask_obs_name=None, mask_obs_edgecut=0,
model_lim=None, model_lim0=None,
catalogs_subproduct=None, catalog_name=None,
kfilt_lbounds=None, dtype=np.float32, model_file_template=None,
Expand All @@ -49,7 +49,14 @@ def __init__(self, *args, data_model_name=None, subproduct=None,
what is supplied here, 'num_splits' is always enforced. All enforced kwargs
are available to be passed to model or sim filename templates.
calibrated : bool, optional
Whether to load calibrated raw data, by default False.
Whether to apply calibration factors to simulations after they are
drawn by default, by default False. If True, calibration factors
will be applied by default but this can be negated at runtime. If
False, calibration factors will not be applied by default but can
be supplied at runtime.
calibrations_subproduct : str, optional
The calibrations subproduct within the supplied data model to use
if calibrated is True. Disregarded if calibrated is False.
differenced : bool, optional
Whether to take differences between splits or treat loaded maps as raw noise
(e.g., a time-domain sim) that will not be differenced, by default True.
Expand Down Expand Up @@ -144,6 +151,7 @@ def __init__(self, *args, data_model_name=None, subproduct=None,

# other instance properties
self._calibrated = calibrated
self._calibrations_subproduct = calibrations_subproduct
self._differenced = differenced
self._dtype = np.dtype(dtype) # better str(...) appearance
self._srcfree = srcfree
Expand Down Expand Up @@ -216,6 +224,7 @@ def param_formatted_dict(self):
maps_product=self._maps_product,
maps_subproduct=self._maps_subproduct,
calibrated=self._calibrated,
calibrations_subproduct=self._calibrations_subproduct,
catalogs_subproduct=self._catalogs_subproduct,
catalog_name=self._catalog_name,
differenced=self._differenced,
Expand Down
Loading