CR1000 Translator
The CR1000 translator script is located in the D:\cns\scripts\ directory and called cr1000_translator.py. This script takes a CR1000 raw data file and strips away the CR1000 headers, and converts the CR1000 timestamps into comma separated date/time values.
The cr1000_translator.py script has the following options.
Options |
Meaning |
-d |
The name of the original CR1000 data file. |
-s |
The name given to the file containing translated data. |
--daily |
This flag is used to specify if the CR1000 data is daily data. If this flag is not given, program assumes hourly data. |
Assuming we have a CR1000 data file called wine-da-1_24_hour.dat, refer to the following figure for an example of using this script to translate the data in this file and save it to wine-da-1_24_hour_pp.dat using the command line.
Figure 1.
This script may be executed using the Loggernet Task Master application. To do this, go to the File -> Open menu in Loggernet. Under the Open menu, there is a menu item called Tasks. Choose this item and the Task Master application opens. Choose the datalogger where the raw data will be translated. In this example, La Vina Winery (WINE-DA-1) is chosen. Highlight La Vina Winery (WINE-DA-1) and choose the Add After button. A task will appear after the datalogger name. For this example, the task is renamed to translate_wine-da-1_daily. Refer to Figure 2.
Under the Command Line Options: text field, enter the following text:
cr1000_translator.py -s d:/webroot/raw_data/wine/wine-da-1_24_hour.dat -d d:/webroot/raw_data/wine/wine-da-1_24_hour_pp.dat --daily
Finally, set the text fields and option fields so that it resembles Figure 2.
Figure 2.
Just make sure that you create a file under webroot/raw_data/ which shares the same file name as the above identification ex: nmcc-gr-1