Commit 86747f38 authored by Clément Haëck's avatar Clément Haëck
Browse files

Up doc

parent be87ccf7
......@@ -38,7 +38,7 @@ def main():
ofile = lib.data.SN_separation.get_filename(args['fixes'])
lib.check_output_dir(ofile, file=True)
lib.setup_meta_attrs(sep, args)
lib.setup_metadata(sep, args)
sep.to_dataset().to_netcdf(ofile)
return sep
......
......@@ -68,5 +68,19 @@ To setup such a function, special arguments in the dictionnary can be used:
~preprocess_finder~ should be a callable that takes in the dataset to process, the corresponding filename, and the finder object, and it should return a dataset.
The ~preprocess_finder_args~ and ~preprocess_finder_kwargs~ members are passed as additionnal arguments to this callable.
* Metadata on creation
It is useful to know when and how the datafiles originated.
To this end, the function ~lib.setup_metadata~ can be used.
It adds to a dataset various global attributes:
- ~"created_with"~: The name of the script, and the machine hostname
- ~"created_with_args"~: The args dictionnary as a string
- ~"created_on"~: The date and time of file creation
- ~"created_on_commit"~: The hash of the current commit/HEAD
#+begin_src python
lib.setup_metadata(ds, args)
ds.to_netcdf(ofile, ds)
#+end_src
* Zones
We define some static 'zones', this dataset is quite special and have its own doc [[file:zones.org][here]].
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment