diff --git a/README.markdown b/README.markdown index 45d753d..86c9e86 100644 --- a/README.markdown +++ b/README.markdown @@ -12,6 +12,8 @@ The parser for converting data from the ASOTR MVN control channels into the CSV - **Output asotr_csv data files description** - **Contacts** +**Note**: \ - path where is asotr_csv program is cloned from heagit + ## Setup 1. Install Rust compiler (if you don't have). Installation on Linux: @@ -41,7 +43,7 @@ After running this commands you will get an execution file (asotr_csv) in the fo \/target/release/ ## Using -### parsing ASOTR MVN data files in specified directory +### Parsing ASOTR MVN data files in specified directory 1. Donwload data from science data server to directory \. If you don't have MVN data, you might download it from server with science SRG data (IP: 193.232.11.95). For questions about downloading science data contact Shtykovsky A. (a.shtykovsky@cosmos.ru) or Chelovekov I. (chelovekov@cosmos.ru) @@ -62,7 +64,7 @@ cd /target/release/ csv data are ready to use in directory: \/target/release/ -### parsing all ASOTR MVN data files in specified directory and subdirectories +### Parsing all ASOTR MVN data files in specified directory and subdirectories 1. Donwload data from science data server to directory \. If you don't have MVN data, you might download it from server with science SRG data (IP: 193.232.11.95). For questions about downloading science data contact Shtykovsky A. (a.shtykovsky@cosmos.ru) or Chelovekov I. (chelovekov@cosmos.ru) @@ -70,21 +72,31 @@ For questions about downloading science data contact Shtykovsky A. (a.shtykovsky 2. Run linux bash script **asotr_all_unzip.sh** for directory with MVN data in order to unpack all **asotr.tar.gz** archives with ASOTR MVN data, for example: ``` cd -./asotr_all_unzip.sh +./asotr_all_unzip.sh / ``` **Note**: the script **asotr_all_unzip.sh** will not work on windows, you will need to unpack the each archive **\/\/data/asotr.tar.gz** manually or write the corresponding Windows bat-file -3. Run program asotr_csv: +If you want to parse astor data in specified directory, run program asotr_csv directly: ``` cd /target/release/ ./asotr_csv -d ``` -csv data are ready to use in directory: -\/target/release/ +3. csv data in directory: +\/data/ ### Plot csv data in Python -If you want to plot csv data you might use \/**asotr_all_unzip_auto.sh** shell script or use \/data/**plot_flight_all.py** python-script directly for set different configurations. +If you want to parse all raw data from astor into csv files and plot csv data you might use shell script: +``` +cd +./asotr_all_unzip_auto.sh +``` + +or if you already have csv files with ASOTR data, you might use plot script only: +``` +cd /data/ +plot_flight_all.py +``` ## Output asotr_csv data files description **description:** diff --git a/asotr_unzip.sh b/asotr_unzip.sh index d08f373..26fecbf 100755 --- a/asotr_unzip.sh +++ b/asotr_unzip.sh @@ -8,4 +8,5 @@ then else path_=$1 tar -xzf ${path_}/data/asotr.tar.gz -C ${path_}/data + tar -xzf ${path_}/logs.tar.gz -C ${path_} fi diff --git a/data/plot_flight_all.py b/data/plot_flight_all.py index c8f9634..10471ea 100644 --- a/data/plot_flight_all.py +++ b/data/plot_flight_all.py @@ -4,12 +4,13 @@ import pandas as pd from datetime import datetime import sys -font = 8 -print_width = 10 -print_height = 8 +font = 4 +print_width = 6 +print_height = 4 width = 1 plot_windows = 2 -channels = [1, 1, 1, 1, 1, 1] +channels = [0, 0, 1, 0, 0, 1] +asotr_kit = '01' xborders=False begin=0; @@ -18,10 +19,10 @@ end=0; path_B = '/home/danila/Danila/work/MVN/flight/beta_forecast/' fname_B = 'beta_2025.xlsx' path = '/home/danila/Danila/work/MVN/Soft/asotr_csv/data/' -fname = 'asotr02_data_T.csv' -fname_pow = 'asotr02_data_P.csv' -pict_name = path + "ASOTR2_flight_T_P_all" -ox_dtime_format = '%d %H:%M' +fname = 'asotr' + asotr_kit + '_data_T.csv' +fname_pow = 'asotr' + asotr_kit + '_data_P.csv' +pict_name = path + 'ASOTR' + asotr_kit + '_flight_T_P_all' +ox_dtime_format = '%d.%m %H:%M:%S' legend=['БРД1', 'БРД2', 'БРД3', 'БРД4', 'плита МУП МВН, датчик1', 'плита МУП МВН, датчик 2'] width=[1, 1, 1, 1, 1, 1] @@ -106,8 +107,9 @@ elif plot_windows == 2: i += 1 ax3 = ax1.twinx() - ax3.plot(data_b['timestamp'], data_b['beta_angle'], marker[4], linewidth=width[5], label='угол Бета') + ax3.plot(data_b['timestamp'], data_b['beta_angle'], marker[4], color='r', linewidth=width[5], label='угол Бета') ax3.set_ylabel('Угол Бета', fontsize=font) + ax3.tick_params(axis="y", width=1, labelsize=font) ax3.legend(fontsize=font, loc='upper right') i = 0 @@ -124,7 +126,7 @@ elif plot_windows == 2: ax1.set_xlabel('Время', fontsize=font) ax1.legend(fontsize=font, loc='lower right') - date_formatter = dates.DateFormatter('%d.%m.%Y %H') + date_formatter = dates.DateFormatter(ox_dtime_format) ax1.xaxis.set_major_formatter(date_formatter) ax2.tick_params(axis="both", width=1, labelsize=font) @@ -136,6 +138,7 @@ elif plot_windows == 2: date_formatter = dates.DateFormatter(ox_dtime_format) ax2.xaxis.set_major_formatter(date_formatter) + plt.title('АСОТР ' + asotr_kit, fontsize=font) plt.tight_layout() fig.savefig(pict_name) plt.show()