Closed RemingtonRohel closed 2 years ago
Good, raises BorealisDataFormatTypeError I imagine if the CPID is more than 16 bits?
@carleyjmartin - Yes, that's correct! I only changed the format for the versions 0.6+.
@kevinkrieger - It doesn't throw that error specifically, but it does raise something.
Testing:
>>> import pydarnio
>>> filetypes = ['antennas_iq', 'bfiq', 'rawacf']
>>> basename = '/data/sample_data/version0.5/20211006.2132.00.sas.0.{}.hdf5.site'
>>> for ftype in filetypes:
... filename = basename.format(ftype)
... try:
... borealis_reader = pydarnio.BorealisRead(filename, ftype, 'site')
... print('Success!')
... except:
... print('Failure')
...
Success!
Success!
Success!
>>> basename = '/data/sample_data/version0.5/20211006.2132.00.sas.0.{}.hdf5'
>>> for ftype in filetypes:
... filename = basename.format(ftype)
... try:
... borealis_reader = pydarnio.BorealisRead(filename, ftype, 'array')
... print('Success!')
... except:
... print('Failure')
...
Success!
Success!
Success!
>>> basename = '/data/sample_data/version0.6/20210815.2116.00.sas.0.{}.hdf5.site'
>>> filetypes = ['bfiq', 'rawacf']
>>> for ftype in filetypes:
... filename = basename.format(ftype)
... try:
... borealis_reader = pydarnio.BorealisRead(filename, ftype, 'site')
... print('Success!')
... except:
... print('Failure')
...
In record 1629062160048 of file /data/sample_data/version0.6/20210815.2116.00.sas.0.bfiq.hdf5.site, the following parameters are not of their given correct type: {'experiment_id': "<class 'numpy.int16'>"}
Failure
In record 1629062160048 of file /data/sample_data/version0.6/20210815.2116.00.sas.0.rawacf.hdf5.site, the following parameters are not of their given correct type: {'experiment_id': "<class 'numpy.int16'>"}
Failure
Scope
Minor change to experiment_id field of Borealis v0.6 files
Approval
Number of approvals: 1
Test
Verify that nothing gets printed when this code is run! Example files here: test_files.zip