Skip to content

test_dataimport.py and dataimport_example issues #67

@kernb2

Description

@kernb2

Documentation Issues in the test_dataimport.py.
Testing in the test_dataimport.py

  • mostly just need to figure out how to test against the indexing error

In the dataimport_example
IndexError Traceback (most recent call last)
in
2 directory = '../ramandecompy/tests/test_files/'
3 # open hdf5 file as read/write
----> 4 dataimport.data_import(hdf5_filename,directory)
5 dataprep.view_hdf5(hdf5_filename+'.hdf5')

~\anaconda3\lib\site-packages\ramandecompy-1.0b0-py3.7.egg\ramandecompy\dataimport.py in data_import(hdf5_filename, directory)
45 if filename.startswith('FA_') and filename.endswith('.csv'):
46 locationandfile = directory + filename
---> 47 dataprep.add_experiment(str(hdf5_filename)+'.hdf5', locationandfile)
48 print('Data from {} fit with compound pseudo-Voigt model. Results saved to {}.'.format(filename, hdf5_filename))
49 # printing out to user the status of the import (because it can take a long time if importing a lot of data,

~\anaconda3\lib\site-packages\ramandecompy-1.0b0-py3.7.egg\ramandecompy\dataprep.py in add_experiment(hdf5_filename, exp_filename)
202 specs = specs.split('_')
203 time = specs[-1]
--> 204 temp = specs[-2]
205 # write data to .hdf5
206 exp_file['{}/{}/wavenumber'.format(temp, time)] = data['wavenumber']

IndexError: list index out of range

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions