arcsec = pixels * in.platescl
r_sun = (pb0r(in.date_d$obs, /soho, /arc))[2]
R_sun = 6.96e8 m
=> 1 arcsec = (R_sun / r_sun) m
=> pixels = in.platescl * R_sun/r_sun m


Error discussion


There's been a lot of talk about error bars and below is an email I sent a while back to re-iterate the use of IDL's deriv and derivsig for obtaining kinematics, with a note at the bottom from looking at this today.
Adding to this was discussion on the possible need for hard-coding minimum/maximum errors since precision cannot be higher than the resolution etc. This brought up questions of how imagers work, PointSpreadFunction awareness, in multiscale the idea of filter size, and in particular a rule by Nyquist that a sampling rate must be at least twice the maximum frequency in order to sufficiently detect it (nice little example here).

deriv.pro works by 3 point Lagrangian interpolation, described here
The propagation of errors equation is at: (and in the handout photocopied from 1st year labs) Error Propagation
The error equation is derived from the Taylor expansion of a function to the first degree.

derivsig.pro seems to apply the idea of the error propagation equation to the use of 3-point Lagrangian in deriv.pro. The basic formula becoming:

(sigd)^2 = [ (sigy_n-1)^2 + (sigy_n+1)^2 ] / (x_n-1 - x_n+1)^2

ie: the error in the previous point plus the error in the following point, divided by the interval. (The squares are just relating variance instead of standard deviation: variance = sigma^2).

If the errors in the x interval aren't the same (aren't all equal to each other) it recalculates to include their individual effects and adds it on to the sigd.

Then for the edge points it does the same but with weightings (similar to how deriv works):

sigd[0] = (sigy[0]^2*9.0 + sigy[1]^2*16.0 + sigy[2]^2) / ( x[2]-x[0] )^2

sigd[n-1]=(sigy[n-1]^2*9.0 + sigy[n-2]^2*16.0 + sigy[n-3]^2) / ( x[2]-x[0] )^2

again recalculating for the x errors if needed.

; See Bevington, "Data Analysis and Reduction for the Physical ; Sciences," McGraw-Hill (1969), Chap 4.

Note:

I can't find better reasoning than derivsig.pro propagation for unevenly spaced samples. Looking at deriv.pro again, it's that a Lagrange interpolation is performed before the derivative is taken, so the weighting between points is based upon how a fit would sit between them, and derivsig goes hand-in-hand with this assumption, but does appear to be determining the propagated error at the midpoint of the interval.