Skip to content

Commit

Permalink
Add the possibylity to run med_to_pc in batch mode on 1 dir of files
Browse files Browse the repository at this point in the history
  • Loading branch information
hedjour committed Oct 24, 2022
1 parent 04ec41a commit 53e39ac
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,35 @@ Data organisation
-------------------

The file is just an output of MedAssociate software.
The path directorie must contains the sub_directories of sessions that containing
the raw data files and returns a csv file.
The path directorie can contains the sub_directories of sessions that containing
the raw data files, or just Medassociate files.

.. warning::
Your raw data directories must only contain med output files.

Example of data organisation for batch run
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::

Experiment directorie/
└── dir 01
├── file_med_associates_to_compil
├── file_med_associates_to_compil
└── file_med_associates_to_compil
└── dir 02
├── file_med_associates_to_compil
├── file_med_associates_to_compil
└── file_med_associates_to_compil

or

Experiment directorie/
├── file_med_associates_to_compil
├── file_med_associates_to_compil
└── file_med_associates_to_compil



Example
-----------------
Expand Down Expand Up @@ -317,6 +341,7 @@ Acknowledgments
* `Université de Poitiers <https://univ-poitiers.fr>`_
* `INSERM <https://inserm.fr>`_
* `Logo FreeVector.com <https://www.freevector.com/smiling-rat-logo>`_
* Thanks to our old contributors as Ekter, Myriam Hanna.

.. raw:: html

Expand Down
3 changes: 3 additions & 0 deletions med_to_csv/expe_med_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def main(path: str, output_file: str, opt:Dict)->pd.DataFrame:
raise RuntimeError(
f"""You have chosen to stop the execution after the following error:
{err}""") from err
elif ptah.isfile(f"{path}/{listd[i]}") :
output_df = read_path(f"{path}/", opt)
break
else :
print(f"""The file {listd[i]} won't be analyzed""")
except FileNotFoundError as e:
Expand Down

0 comments on commit 53e39ac

Please sign in to comment.