Commit a06092d9 authored by Carl Schaffer's avatar Carl Schaffer
Browse files

Merge branch 'coord_study' into 'master'

Coord study

See merge request !165
parents f659f0ce bee2da1c
0.172, 20.707
0.174, 20.488
0.187, 23.780
0.195, 24.512
0.237, 24.187
0.269, 25.610
0.308, 23.536
0.313, 26.707
0.334, 24.512
0.347, 27.073
0.352, 22.683
0.374, 24.808
0.393, 30.099
0.395, 22.317
0.425, 27.439
0.444, 25.350
0.445, 56.017
0.464, 27.439
0.468, 31.004
0.514, 36.158
0.521, 38.780
0.565, 36.311
0.627, 46.235
0.637, 35.377
0.651, 29.152
0.668, 45.000
0.696, 44.357
0.707, 33.578
0.709, 29.383
0.739, 54.135
0.760, 41.495
0.787, 55.299
0.843, 41.548
0.903, 49.103
0.906, 57.679
0.927, 42.284
0.959, 60.059
0.991, 42.552
1.051, 45.238
1.176, 61.117
1.323, 54.457
1.430, 93.417
1.521, 67.992
1.574, 67.992
1.581, 41.963
2.089, 45.099
2.447, 46.421
2.698, 93.417
3.237, 71.543
3.425, 77.928
3.510, 86.966
3.675, 100.813
3.701, 121.788
4.072, 126.850
4.241, 123.904
4.392, 127.266
4.522, 117.282
5.057, 140.828
5.556, 132.805
......@@ -120,7 +120,7 @@ def plot_simple_coords_with_HMI(manolo_file):
if "13may18.001" in manolo_file:
add_point(
SkyCoord(
Helioprojective(-122 * u.arcsec, 127 * u.arcsec), obstime=date_beg
Helioprojective(-122 * u.arcsec, 127 * u.arcsec, observer='earth'), obstime=date_beg
),
"x",
label="Actual position",
......@@ -145,6 +145,7 @@ def plot_simple_coords_with_HMI(manolo_file):
if __name__ == "__main__":
pass
# Mercury transit, mercury not yet in image
# plot_simple_coords_with_HMI(r"Y:\dat\sdc\gris\20191111\level1\11nov19.002")
......@@ -165,6 +166,3 @@ if __name__ == "__main__":
# Mercury transit, mercury enters disk, LATI LONG are best
plot_simple_coords_with_HMI(r"Y:\dat\sdc\gris\20191111\level1\11nov19.008")
# Two pores with cross correlation, SLITPOSXY perform better than LATI LONG
plot_simple_coords_with_HMI(r"Y:\dat\sdc\gris\20180513\level1\13may18.001")
......@@ -20,7 +20,7 @@ ser = pd.Series(pos)
df[f'gris_{date.strftime("%Y%m%d")}_{run:03d}'] = ser
df = df.T
df.index.name = 'obs_name'
df.date_beg = pd.to_datetime(df.date_beg)
from sqlalchemy import create_engine
db_name = 'sqlite:///' + str(outfile)
......
......@@ -136,22 +136,22 @@ def extract_position_kws_from_manolo(raw_gris_file):
env = {}
pos_infos = None
trigger_kw = "FRIEDR0"
trigger_kw = "ISTEP"
step = 0
for key, value in chain(*[h.items() for h in headers]):
if str(value).strip() == '' and key in env.keys():
value = env[key]
env[key] = value
if key == 'ISERIE' and value == 2:
next_map = key == 'ISERIE' and value == 2
if next_map:
# Stop iteration after first map
break
if key == trigger_kw:
if key == trigger_kw and value != 1:
if pos_infos is None:
pos_infos = [None] * env["STEPS"]
try:
info = info_from_env(env)
except TypeError as e:
print(e)
continue
pos_infos[env["ISTEP"] - 1] = info
# print(info)
pos_infos[step] = info_from_env(env)
step += 1
pos_infos[step] = info_from_env(env)
pos_infos = np.array(pos_infos)
# coords map 1
indexes = {k: i for i, k in enumerate(pos_kws)}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment