Skip to content

Commit f008c8f

Browse files
committed
get solar el & az from L0s
1 parent b03fee9 commit f008c8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pyroheliometer.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ begin
147147
@assert length(f) >= 1
148148
hdr = read_header(f[1])
149149
exptime = hdr["EXPTIME"]
150+
hdr_pyrhelio = read_header(f["SOLAR"])
151+
stel = hdr_pyrhelio["STEL"]
152+
staz = hdr_pyrhelio["STAZ"]
150153
#println(fn,": exptime = ", exptime)
151154

152155
t = read(f["SOLAR"],"Time")
@@ -160,9 +163,9 @@ begin
160163
rms_pyroflux = sqrt(var(df_tmp.FluxDensity, corrected=false))
161164
(min_pyroflux,max_pyroflux) = extrema(df_tmp.FluxDensity)
162165
close(f)
163-
return (;filename=basename(fn), time_start=t_start, exptime, mean_Δt, mean_pyroflux, rms_pyroflux, min_pyroflux, max_pyroflux)
166+
return (;filename=basename(fn), time_start=t_start, exptime, mean_Δt, mean_pyroflux, rms_pyroflux, min_pyroflux, max_pyroflux, stel, staz)
164167
catch exepction
165-
return (;filename=basename(fn), time_start=t_start, exptime=missing, mean_Δt=missing, mean_pyroflux=missing, rms_pyroflux=missing, min_pyroflux=missing, max_pyroflux=missing)
168+
return (;filename=basename(fn), time_start=t_start, exptime=missing, mean_Δt=missing, mean_pyroflux=missing, rms_pyroflux=missing, min_pyroflux=missing, max_pyroflux=missing, stel=missing, staz=missing)
166169
end
167170
end
168171

0 commit comments

Comments
 (0)