190 likes | 338 Views
PFI Cobra/MC simulator. Peter Mao. purpose . develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions. No attempt is made to account for fiber collisions or physical interferences. routines.
E N D
PFI Cobra/MC simulator Peter Mao
purpose • develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions. • No attempt is made to account for fiber collisions or physical interferences.
routines • make_PFI_bench: complete geometrical description of the PFI bench (static). • break_PFI_bench: disables fibers by rail, connector or individual fibers (random). • MCsimulator: moves fibers to “home,” “antihome,” or “random” positions, rotates the PFI bench and applies a wide-field corrector (WFC) distortion pattern to the positions. • find_fiducials: finds the FFs, solves for the rotation angle and distortion center of the MC image.
future routines • move_cobras: takes in the current state of PFI and returns a MC list of centroids corresponding to the new state of PFI. • match_fibers: match non-FF centroids in the MC image to Cobras.
make_PFI_bench • includes variability in Cobra and FF placement, Cobra arm lengths. • theta=0 positions are randomized
break_PFI_bench • specify number of rail, connectors and fibers to “break”
MCsimulator.m • returns a list of positions (“centroids”) that would be seen by an ideal MC looking through the WFC at PFI. • In these plots, PA is fixed (but nonzero), and the distortion center (marked by “+”) is randomly placed within 25 mm of the PFI origin.
Hough transform • calculate the distance (rho) and angle (theta) of a normal vector from the origin to a line in 2-space. • colinear line segments cluster in (theta,rho) space. Y rho rho theta theta X
find_fiducials.m 1/4 • If we can identify at least two of the spines, then we can solve for the location of the center fiber. (see next page) • Presently, if the center FF is missing, the estimated position from the intersection of the first two Hough lines is used. A better estimate would use all information available. • Hough transform: • Identify centroids that have no neighbors closer than 3 mm (using some nominal pixel scale) – only SF do that. • Identify centroid pairs (after above cut) whose distances lie between 15 and 16.1 mm (low set by distortion, high set by pitch + placement error) • Run Hough transform on all pairs. • Can tighten up FF pair identification by running MC image through inverse WFC correction (assuming distortion center is at mean fiber location. FF spine search region
find_fiducials.m 2/4 • ID the radial spines using angles of the Hough solutions + rotator information (here encoded in the output of MCsimulation) • ID the center fiber as the fiber closest to the intersection of the Hough lines. • The FF mask (with distortion centered on the PFI origin) is now lined up with the MC centroids. FF’s are identified by calculating the distance of the nearest centroid to each FF mask location
find_fiducials.m 3/4 • Some rejection scheme must be implemented to match fibers (centroids) to FFs and detect broken fibers. • Presently, I’m using median + 1 standard deviation • Some type of clustering algorithm could also be used to identify the outliers. • This issue will be left for another time.
find_fiducials.m 4/4 • The location of the mean of all FFs (using the mask locations for missing fibers) relative to the origin gives us the distortion center (DC) • The scaling from mean FF to DC is a function of the number of lost FFs and the magnitude of the mean FF position. • With the FF’s ID’d we can rotate and translate the MC coordinate system to align it with the PFI axes
overview • The Metrology Camera System (MCS) provides the position feedback for Cobra motions. • The MCS image of the backlit fibers will be distorted by the WFC optics. The distortion will be a function of telescope Altitude angle and environmental conditions, but NOT rotator angle. • In this simulation, “measurement error” includes: • MCS position error (due to seeing and centroiding) • science fiber homing position error • fiber home position calibrations error. • Presumably these errors add in quadrature, so their allocation is outside the scope of this simulation.
algorithm overview • Distortion/displacement map requires that ALL fibers be brought to their home position. • Axis center locations (found by imaging fibers in motion) are not sufficiently accurate – we really need the true home positions! • FF’s must be identified (I don’t have this yet... but I will) • Using a nominal plate scale for the MCS image, we calculate • ΔX = XMCS – XPFI • ΔY = YMCS – YPFI • Use biharmonic interpolation to make fits to (XMCS, YMCS, ΔX) and (XMCS, YMCS, ΔY) • The fit tables and then used to calculate ΔX and ΔY for arbitrary values of (XMCS,YMCS)
computational time estimates • sims were run in Matlab on a 2-core PC • find_fiducials takes ~1 second • biharmonic fit takes 4.5 sec (only needs to be done once per pointing) • biharmonic solution takes 4.5 sec (needs to be done each time the Cobras are moved). • baseline, expect time to drop by 1/10 to 1/100.
Interpolation error maps Log scale for the zero error case!! 0 == 1 micron! FWHM of the interpolation error distribution is ~2 x the measurement error (better shown on later slide) For any realistic measurement error (>= 1 um), the interpolation error is dwarfed by the measurement error
scatter plots for no error & 4 micron measurement error (FWHM) 4 um case is roughly gaussian but 0 error case is NOT Gaussian! Here, you can probably eyeball the fact that the interpolation error FWHM is ~ 8 microns for the 4 um measurement error case
interpolation error cumulative distributions interpolation error is < 1 um for ~98% of the fibers magnitude of the error distribution scales linearly with the msmt error (factors of 2 here). the 2 um (FWHM) Gaussian matches the 1 um msmt error distribution