irfpy.swim.ace
¶
This module is for ACE data to compare with SWIM.
ACE data, both non-shifted and shifted to the Moon position, is supported by this module. The non-shifted data was obtained from the web, and the class Ace is for it. The shifted data can be generated by ace2moon.py program in the script folder, and the program dumps it to ace2moon.dat file. The class AceMoon is for the shifted data.
The simplest way of retrieving the solar wind condition at the Moon is as follows.
>>> acemoon = AceMoon()
>>> dat = acemoon.getAverage(datetime.datetime(2009,1,25,13,0,0), datetime.datetime(2009,1,25,14,0,0))
- class irfpy.swim.ace.AceElemAtMoon(aceElem)[source]¶
Bases:
object
Ace data at Moon at an instance. Using AceElem class, the time of the Moon is calculated.
Initialize the data. ValueError is thrown if the data is not available.
- class irfpy.swim.ace.AceMoon(rcfile=None)[source]¶
Bases:
object
Class for ACE Moon data.
The shifted ACE data is generated by ace2moon.py in script folder from the non-shifted ACE data. The ACE data can be infered to the Moon position considering the ACE and Moon position, and ace2moon.py will dump the result to shifted ace2moon.dat file. The file location can be specified by .irfpyrc, where [swim] section acemoon property.
- getList(start_time, stop_time)[source]¶
Get ACE data at Moon between start_time and stop_time. Data format is JdSeries with AceMoonData class.
- getAverage(t0, t1)[source]¶
Returns the average and the standard deviation of the solar wind parameter.
The returned value is a tuple ( ave_np, std_np, ave_vx, std_vx, ave_vy, std_vy, ave_vz, std_vz, ave_Tp, std_Tp, ave_rHe, std_rHe, ave_bx, std_bx, ave_by, std_by, ave_bz, std_bz ) where rHe is the helium ratio.
- class irfpy.swim.ace.Ace(rcfile=None)[source]¶
Bases:
object
Class for ACE L2 MERGE data.
Data is set by irfpyrc setup file, from the entry [swim] acemerge.
- getList(start_time, stop_time)[source]¶
Get ACE data between start_time and stop_time. Data format is JdSeries with AceElem class.
- getAverage(t0, t1)[source]¶
Returns the average and the standard deviation of the solar wind parameter.
The returned value is a tuple ( ave_np, std_np, ave_vx, std_vx, ave_vy, std_vy, ave_vz, std_vz, ave_Tp, std_Tp, ave_rHe, std_rHe, ave_bx, std_bx, ave_by, std_by, ave_bz, std_bz ) where rHe is the helium ratio.
- class irfpy.swim.ace.AceData[source]¶
Bases:
object
Class for ACE Browse data. For L2 data, use Ace class.
You can refer to the data index by class varibales of (YEAR_F, DOY, BX, BY, BZ, BT, BP, B, NPROTON, HEPRATIO, VSW, TSW).
- DEFAULT_BROWSE_URI = '/Volumes/scidata/data/moon/support/ACE/Browse/PARAM/ACE_Browse_Data.txt'¶
- YEAR_F = 0¶
- DOY = 1¶
- BX = 2¶
- BY = 3¶
- BZ = 4¶
- BT = 5¶
- BP = 6¶
- B = 7¶
- NPROTON = 8¶
- HEPRATIO = 9¶
- VSW = 10¶
- TSW = 11¶
- LABEL = ('YEAR', 'DOY', 'Bx', 'By', 'Bz', 'Bt', 'Bp', '|B|', 'NH+', 'NHe++/NH+', 'Vsw', 'Tsw')¶