# 2019/0059 The .csv files contain the output SPL_Total for the first ten minutes of each hour during the referenced month. The csv contains one line for first ten minutes of each hour. (NB: an adjustment of 49.0 has been added to the SPL_Total, which is not the case with the ERDDAP data) The .txt files contain the input data lines from the fft files. These .txt files were generated by finding the matching data lines during minutes 0-9 of each hour. The following commands were used: # Grabbing the data first ten minutes each hour ``` for month in 08 09 do for item in 2018/$month/* do grep -E '^[0-9]{2}:0' $item/*.txt >> 2018${month}_topten.txt done done ``` # Check the settings haven't been changed (they were changed on 08/01) Use cksum or similar and make a note of time when change occurred. Remove all the data from before (or after) the change, so that the same settings apply for all the data. ``` for item in 08/01/*.txt; do echo -n "$item " ; head -27 $item | tail -10 | cksum ; done ``` # Prepend the fft file header into the data (do this for each month) ``` head -30 2018/09/01/SBF1323_20180901_000000.txt > 201809_topten_header.txt cat 201809_topten_header.txt 201809_topten.txt > 201809_first_ten_minutes_each_hour.txt ``` NB: use the header from a time that is in the data file! # spl_script.js This script was used to generate the output csv files These settings were used (see top of spl_script.js) var BUCKET_SECONDS = 600; var BINS_WANTED = [63,125,1000,2000,12000,30000]; ``` nodejs ./spl_script.js 201809_first_ten_minutes_each_hour.txt > 201809_first_ten_minutes_each_hour.csv ```