From ccddec6261b7b6af48a1766695e9b24d816a8e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 7 Mar 2018 09:55:27 +0100 Subject: [PATCH] Adapt to new pyfact version --- erna/__init__.py | 2 +- erna/scripts/gather_fits.py | 2 +- setup.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erna/__init__.py b/erna/__init__.py index 2664989..29d9be5 100644 --- a/erna/__init__.py +++ b/erna/__init__.py @@ -129,7 +129,7 @@ def collect_output(job_outputs, output_path, df_started_runs=None, **kwargs): df_returned_data.to_json(output_path, orient='records', date_format='epoch', **kwargs ) elif extension in ['.h5', '.hdf','.hdf5']: logger.info("Writing HDF5 to {}".format(output_path)) - to_h5py(output_path, df_returned_data, key='events', mode='w', **kwargs) + to_h5py(df_returned_data, output_path, key='events', mode='w', **kwargs) elif extension == '.csv': logger.info("Writing CSV to {}".format(output_path)) df_returned_data.to_csv(output_path, **kwargs) diff --git a/erna/scripts/gather_fits.py b/erna/scripts/gather_fits.py index c869a94..87df499 100644 --- a/erna/scripts/gather_fits.py +++ b/erna/scripts/gather_fits.py @@ -178,7 +178,7 @@ def main(xml_name, ft_version, outputfile, config, start, end, source, datacheck 'run_start', 'run_stop', ] - to_h5py(outputfile, successful_jobs[columns], key='runs', mode='w') + to_h5py(successful_jobs[columns], outputfile, key='runs', mode='w') with h5py.File(outputfile, 'a') as f: f['runs'].attrs['datacheck'] = ' AND '.join(conditions) diff --git a/setup.py b/setup.py index def1190..fcf11f0 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='erna', - version='0.7.0', + version='0.8.0', description='Easy RuN Access. Tools that help to do batch processing of FACT data', url='https://github.com/fact-project/erna', author='Kai Brügge, Jens Buss, Maximilian Nöthe', @@ -26,7 +26,7 @@ 'PyMySQL', # in anaconda 'pytz', # in anaconda 'tables', # needs to be installed by pip for some reason - 'pyfact>=0.14.0', + 'pyfact>=0.17.0', 'astropy', 'h5py', # 'hdf5',