geomagpy / magpy

MagPy (or GeomagPy) is a Python package for analysing and displaying geomagnetic data.
BSD 3-Clause "New" or "Revised" License
45 stars 27 forks source link

G value in BLV files #109

Closed leonro closed 1 year ago

leonro commented 2 years ago

I have some extra question concerning the blv, when we safe it from magpy-gui the G (DDDD.DD) values are not included

001_AAAAAA.AA_BBBBBB.BB_ZZZZZZ.ZZ_SSSSSS.SS_DDDD.DD_mCrLf

So I wrote a small script that reads the iaga files and calculates the daily means of the G value .

data = load_iaga_files() data.delta_f() data.get_gaps() daily_mean = data.dailymeans(keys=['df']) daily_means = daily_mean.ndarray[1]

After that I just parse the previous created blv and find replace the necessary 888 with the correct value. I wondered if there was a more elegant way to do with magpy methods. I tried to read the excisting blv with magpy but wasn't able to add the daily means.

leonro commented 1 year ago

A new "export" window has been included to XMagPy when exporting BLV data. Here you can automatically add appropriate dailymean values provided that you have previously opend a full year of one-minute definitive data. You just selelct this data source as daily mean source and XMagPy will do the rest for you. Nevertheless, definitive data is indispensible.

Further details: https://github.com/geomagpy/magpy/issues/126#issuecomment-1529485476