19
PFI Cobra/MC simulator Peter Mao

PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

Embed Size (px)

Citation preview

Page 1: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

PFI Cobra/MC simulator

Peter Mao

Page 2: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 3: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 4: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 5: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

make_PFI_bench

• includes variability in Cobra and FF placement, Cobra arm lengths.

• theta=0 positions are randomized

Page 6: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

break_PFI_bench

• specify number of rail, connectors and fibers to “break”

Page 7: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 8: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

X

Y

theta

rho

theta

rho

Page 9: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

find_fiducials.m 1/4• Hough transform:1. Identify centroids that have no neighbors closer than 3 mm

(using some nominal pixel scale) – only SF do that.2. 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)

3. 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.

• 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.

FF spine search regionFF spine search region

Page 10: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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

Page 11: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 12: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

find_fiducials.m 4/4• With the FF’s ID’d we can rotate

and translate the MC coordinate system to align it with the PFI axes

• 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.

Page 13: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

MC PFI coordinate conversion

Page 14: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 15: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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)

Page 16: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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.

Page 17: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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

Page 18: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

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

Page 19: PFI Cobra/MC simulator Peter Mao. purpose develop algorithms for fiducial (FF) and science (SF) fiber identification under representative operating conditions

interpolation error cumulative distributions

the 2 um (FWHM) Gaussian matches the 1 um msmt error distribution

magnitude of the error distribution scales linearly with the msmt error (factors of 2 here).

interpolation error is < 1 um for ~98% of the fibers