In [1]:
from pds import read_dat

In [2]:
datlabels = [
    'test/data/dph_example_products/product_table_binary/Product_Table_Binary_LSB.xml',
    'test/data/dph_example_products/product_table_binary/Product_Table_Binary_MSB.xml']
datfiles = [
    'test/data/dph_example_products/product_table_binary/Product_Table_Binary_LSB.DAT',
    'test/data/dph_example_products/product_table_binary/Product_Table_Binary_MSB.DAT']

In [3]:
data = read_dat(datlabels[0])
print(data)


    SOL  Local True Solar Time  Local Mean Solar Time  Wind Speed  \
0    91                  0.088              91.069511       5.156   
1    91                  0.088              91.069511       5.156   
2    91                  0.088              91.070290       5.155   
3    91                  0.089              91.071053       5.155   
4    91                  0.377              91.358543       2.225   
5    91                  0.377              91.359192       2.010   
6    91                  0.378              91.359779       1.928   
7    91                  0.379              91.360420       1.366   
8    91                  0.379              91.361038       1.494   
9    91                  0.380              91.361649       1.908   
10   91                  0.380              91.362289       1.677   
11   91                  0.381              91.362892       1.720   
12   91                  0.382              91.364151       2.645   
13   91                  0.383              91.364769       4.752   
14   91                  0.384              91.365433       4.521   
15   91                  0.384              91.366043       3.427   
16   91                  0.385              91.366631       3.239   
17   91                  0.385              91.367287       2.826   
18   91                  0.386              91.367920       2.840   
19   91                  0.387              91.368507       3.124   
20   91                  0.387              91.369171       3.317   
21  151                  0.229             151.204636       2.980   
22  151                  0.230             151.205276       3.072   

    Wind Speed Positive Uncertainty  Wind Speed Negative Uncertainty  \
0                              0.42                          0.42656   
1                              0.42                          0.42656   
2                              0.42                          0.42652   
3                              0.42                          0.42657   
4                              0.72                          0.56432   
5                              0.64                          0.51506   
6                              0.70                          0.52962   
7                              1.71                          0.71758   
8                              1.47                          0.69841   
9                              0.83                          0.58457   
10                             1.13                          0.65682   
11                             0.87                          0.57686   
12                             0.49                          0.40090   
13                             0.40                          0.39856   
14                             0.40                          0.39494   
15                             0.39                          0.38187   
16                             0.39                          0.37979   
17                             0.42                          0.39259   
18                             0.42                          0.39058   
19                             0.39                          0.37922   
20                             0.39                          0.37703   
21                             0.43                          0.40324   
22                             0.46                          0.41565   

    Wind Direction  Direction Uncertainty  Exposure Time             File Name  
0       125.547150               4.769100   15300.000000  b'SS091A990R6M1.IMG'  
1       125.547150               4.769100   15300.000000  b'SS091A990R6M1.IMG'  
2       125.550545               4.769200   15300.000000  b'SS091A990R6M1.IMG'  
3       125.550346               4.769200   15300.000000  b'SS091A990R6M1.IMG'  
4       147.854446              19.130501    4314.600098  b'SS091AA00R6M1.IMG'  
5       197.022186              18.750700    4314.600098  b'SS091AA00R6M1.IMG'  
6       199.881317              21.412100    4314.600098  b'SS091AA00R6M1.IMG'  
7       185.232254             180.000000    4314.600098  b'SS091AA00R6M1.IMG'  
8       179.932617              81.246101    4314.600098  b'SS091AA00R6M1.IMG'  
9       171.164932              25.844500    4314.600098  b'SS091AA00R6M1.IMG'  
10      169.245041              42.420601    4314.600098  b'SS091AA00R6M1.IMG'  
11      237.047256              30.678499    4314.600098  b'SS091AA00R6M1.IMG'  
12      323.650452              10.766500    4314.600098  b'SS091AA00R6M1.IMG'  
13       10.696469               4.841300    4314.600098  b'SS091AA00R6M1.IMG'  
14      358.661560               5.182300    4314.600098  b'SS091AA00R6M1.IMG'  
15       13.809568               6.602700    4314.600098  b'SS091AA00R6M1.IMG'  
16        4.907225               7.023800    4314.600098  b'SS091AA00R6M1.IMG'  
17      317.423492               8.746600    4314.600098  b'SS091AA00R6M1.IMG'  
18      321.608215               8.685900    4314.600098  b'SS091AA00R6M1.IMG'  
19      339.039673               7.338900    4314.600098  b'SS091AA00R6M1.IMG'  
20      352.720825               6.769000    4314.600098  b'SS091AA00R6M1.IMG'  
21      293.965179               8.395200    7140.000000  b'SS1520900R6M1.IMG'  
22      268.822083               8.616600    7140.000000  b'SS1520900R6M1.IMG'  
/anaconda3/lib/python3.6/site-packages/pds4_tools/reader/data_types.py:113: FutureWarning: Conversion of the second argument of issubdtype from `str` to `str` is deprecated. In future, it will be treated as `np.str_ == np.dtype(str).type`.
  dtype = 'U' if (np.issubdtype(data.dtype, np.unicode) or decode_strings) else 'S'

In [4]:
data = read_dat(datlabels[1])
print(data)


    SOL  Local True Solar Time  Local Mean Solar Time  Wind Speed  \
0    91                  0.088              91.069511       5.156   
1    91                  0.088              91.069511       5.156   
2    91                  0.088              91.070290       5.155   
3    91                  0.089              91.071053       5.155   
4    91                  0.377              91.358543       2.225   
5    91                  0.377              91.359192       2.010   
6    91                  0.378              91.359779       1.928   
7    91                  0.379              91.360420       1.366   
8    91                  0.379              91.361038       1.494   
9    91                  0.380              91.361649       1.908   
10   91                  0.380              91.362289       1.677   
11   91                  0.381              91.362892       1.720   
12   91                  0.382              91.364151       2.645   
13   91                  0.383              91.364769       4.752   
14   91                  0.384              91.365433       4.521   
15   91                  0.384              91.366043       3.427   
16   91                  0.385              91.366631       3.239   
17   91                  0.385              91.367287       2.826   
18   91                  0.386              91.367920       2.840   
19   91                  0.387              91.368507       3.124   
20   91                  0.387              91.369171       3.317   
21  151                  0.229             151.204636       2.980   
22  151                  0.230             151.205276       3.072   

    Wind Speed Positive Uncertainty  Wind Speed Negative Uncertainty  \
0                              0.42                          0.42656   
1                              0.42                          0.42656   
2                              0.42                          0.42652   
3                              0.42                          0.42657   
4                              0.72                          0.56432   
5                              0.64                          0.51506   
6                              0.70                          0.52962   
7                              1.71                          0.71758   
8                              1.47                          0.69841   
9                              0.83                          0.58457   
10                             1.13                          0.65682   
11                             0.87                          0.57686   
12                             0.49                          0.40090   
13                             0.40                          0.39856   
14                             0.40                          0.39494   
15                             0.39                          0.38187   
16                             0.39                          0.37979   
17                             0.42                          0.39259   
18                             0.42                          0.39058   
19                             0.39                          0.37922   
20                             0.39                          0.37703   
21                             0.43                          0.40324   
22                             0.46                          0.41565   

    Wind Direction  Direction Uncertainty  Exposure Time             File Name  
0       125.547150               4.769100   15300.000000  b'SS091A990R6M1.IMG'  
1       125.547150               4.769100   15300.000000  b'SS091A990R6M1.IMG'  
2       125.550545               4.769200   15300.000000  b'SS091A990R6M1.IMG'  
3       125.550346               4.769200   15300.000000  b'SS091A990R6M1.IMG'  
4       147.854446              19.130501    4314.600098  b'SS091AA00R6M1.IMG'  
5       197.022186              18.750700    4314.600098  b'SS091AA00R6M1.IMG'  
6       199.881317              21.412100    4314.600098  b'SS091AA00R6M1.IMG'  
7       185.232254             180.000000    4314.600098  b'SS091AA00R6M1.IMG'  
8       179.932617              81.246101    4314.600098  b'SS091AA00R6M1.IMG'  
9       171.164932              25.844500    4314.600098  b'SS091AA00R6M1.IMG'  
10      169.245041              42.420601    4314.600098  b'SS091AA00R6M1.IMG'  
11      237.047256              30.678499    4314.600098  b'SS091AA00R6M1.IMG'  
12      323.650452              10.766500    4314.600098  b'SS091AA00R6M1.IMG'  
13       10.696469               4.841300    4314.600098  b'SS091AA00R6M1.IMG'  
14      358.661560               5.182300    4314.600098  b'SS091AA00R6M1.IMG'  
15       13.809568               6.602700    4314.600098  b'SS091AA00R6M1.IMG'  
16        4.907225               7.023800    4314.600098  b'SS091AA00R6M1.IMG'  
17      317.423492               8.746600    4314.600098  b'SS091AA00R6M1.IMG'  
18      321.608215               8.685900    4314.600098  b'SS091AA00R6M1.IMG'  
19      339.039673               7.338900    4314.600098  b'SS091AA00R6M1.IMG'  
20      352.720825               6.769000    4314.600098  b'SS091AA00R6M1.IMG'  
21      293.965179               8.395200    7140.000000  b'SS1520900R6M1.IMG'  
22      268.822083               8.616600    7140.000000  b'SS1520900R6M1.IMG'  
/anaconda3/lib/python3.6/site-packages/pds4_tools/reader/data_types.py:113: FutureWarning: Conversion of the second argument of issubdtype from `str` to `str` is deprecated. In future, it will be treated as `np.str_ == np.dtype(str).type`.
  dtype = 'U' if (np.issubdtype(data.dtype, np.unicode) or decode_strings) else 'S'

In [ ]: