...
Code Block |
---|
# Open X-Projection mapping fdx = open (XPROJ_MAP, READ_ONLY, TEXT_FILE) call gs_ingest (fdx, asfx, asfy) do i = 0, nslit-2 { ndx1 = Memi[bufi+i] ndx2 = Memi[bufi+i+1] pc1 = PCODE(sdat,ndx1) pc2 = PCODE(sdat,ndx2) # If both are alignment boxes, just go on ... if (pc1 == CODE_AS && pc2 == CODE_AS) # no problem next ...... # We will need to recalculate something ... xlow = X2(sdat,ndx1) + SLIT_GAP(indat) xupp = X1(sdat,ndx2) - SLIT_GAP(indat) xcen = 0.5 * (xlow + xupp) yas = Y2(sdat,ndx1) dxlow = gseval (asfx, xcen, yas) yas = Y1(sdat,ndx2) dxupp = gseval (asfx, xcen, yas) dxavg = 0.5 * (dxupp + dxlow) dxlow = dxlow - dxavg dxupp = dxupp - dxavg call eprintf ("%6.3f %6.3f\n") call pargr (dxlow) call pargr (dxupp) if (pc1 == CODE_AS) { del1 = 0. del2 = X1(sdat,ndx2) - xlow - (dxupp - dxlow) } else if (pc2 == CODE_AS) { del1 = xupp - X2(sdat,ndx1) + (dxlow - dxupp) del2 = 0. } else { del1 = xcen - 0.5*SLIT_GAP(indat) - X2(sdat,ndx1) + dxlow del2 = X1(sdat,ndx2) - (xcen + 0.5*SLIT_GAP(indat)) - dxupp } X2(sdat,ndx1) = X2(sdat,ndx1) + del1 if (del1 != 0. && RELPA(sdat,ndx1) != INDEF) { tana = tan (RELPA(sdat,ndx1)) Y2(sdat,ndx1) = Y2(sdat,ndx1) + del1 * FLIP * tana } X1(sdat,ndx2) = X1(sdat,ndx2) - del2 if (del2 != 0. && RELPA(sdat,ndx2) != INDEF) { tana = tan (RELPA(sdat,ndx2)) Y1(sdat,ndx2) = Y1(sdat,ndx2) - del2 * FLIP * tana } |
...