In [245]:
# Working on identifying which celestial objects land on the GFAs

from astropy.io import fits
from astropy.table import Table
import desimodel.io
import desimodel.footprint
%pylab

sweep = Table.read('sweep-050p030-060p035.fits')
sweep1 = Table.read('sweep-060p065-070p070.fits')

plot(sweep['RA'], sweep['DEC'], 'b.')
tiles = desimodel.io.load_tiles()
#print(tiles.dtype.names)
#print(tiles['TILEID'])

radec = desimodel.footprint.get_tile_radec(4)
#print(radec)
#print(tiles['RA'])
#print(tiles['DEC'])
for targets in sweep:
    if(targets['FLUX_R'] > 0):
        print(targets['FLUX_R'])
#sweep
sweep1


Using matplotlib backend: MacOSX
Populating the interactive namespace from numpy and matplotlib
Out[245]:
<Table length=59199>
RELEASEBRICKIDBRICKNAMEOBJIDTYPERADECRA_IVARDEC_IVARDCHISQ [5]EBVFLUX_GFLUX_RFLUX_ZFLUX_W1FLUX_W2FLUX_W3FLUX_W4FLUX_IVAR_GFLUX_IVAR_RFLUX_IVAR_ZFLUX_IVAR_W1FLUX_IVAR_W2FLUX_IVAR_W3FLUX_IVAR_W4MW_TRANSMISSION_GMW_TRANSMISSION_RMW_TRANSMISSION_ZMW_TRANSMISSION_W1MW_TRANSMISSION_W2MW_TRANSMISSION_W3MW_TRANSMISSION_W4NOBS_GNOBS_RNOBS_ZNOBS_W1NOBS_W2NOBS_W3NOBS_W4RCHISQ_GRCHISQ_RRCHISQ_ZRCHISQ_W1RCHISQ_W2RCHISQ_W3RCHISQ_W4FRACFLUX_GFRACFLUX_RFRACFLUX_ZFRACFLUX_W1FRACFLUX_W2FRACFLUX_W3FRACFLUX_W4FRACMASKED_GFRACMASKED_RFRACMASKED_ZFRACIN_GFRACIN_RFRACIN_ZANYMASK_GANYMASK_RANYMASK_ZALLMASK_GALLMASK_RALLMASK_ZWISEMASK_W1WISEMASK_W2PSFSIZE_GPSFSIZE_RPSFSIZE_ZPSFDEPTH_GPSFDEPTH_RPSFDEPTH_ZGALDEPTH_GGALDEPTH_RGALDEPTH_ZWISE_COADD_IDFRACDEVFRACDEV_IVARSHAPEDEV_RSHAPEDEV_R_IVARSHAPEDEV_E1SHAPEDEV_E1_IVARSHAPEDEV_E2SHAPEDEV_E2_IVARSHAPEEXP_RSHAPEEXP_R_IVARSHAPEEXP_E1SHAPEEXP_E1_IVARSHAPEEXP_E2SHAPEEXP_E2_IVAR
int32int32str8int32str4float64float64float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int16int16int16int16int16int16int16float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int16int16int16int16int16int16uint8uint8float32float32float32float32float32float32float32float32float32str8float32float32float32float32float32float32float32float32float32float32float32float32float32float32
40006354010658p6700PSF66.145419946866.90848318074.72097e+094.43343e+101696.91 .. 0.00.50570.089.95390.0-3.52-6.55881-68.2792-208.3780.00.1969210.02.4150.5402220.001399223.02673e-050.2238060.3648070.5689040.9178680.9487290.9888380.99577101010110016160.04.088590.016.88162.333630.5496870.1468330.00.00.00.07983470.0717180.6846661.410970.00.8892680.00.00.9838890.0030030000.00.00.00.00.00.00.00.00.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354010658p6701DEV66.125374088566.90839769932.33287e+083.8971e+114220.77 .. 3351.960.5091570.02341.740.0-6.83844-12.82-1053.54-3619.380.00.004260480.00.03857180.009839253.44313e-051.14029e-060.2215270.3623010.5667140.9173310.9483880.9887620.99574201010010015160.029.66540.01.545330.2609970.2282510.06086150.00.1596220.04.457081.98640.1245540.3296640.00.6159110.00.00.1967020.0040040000.00.00.00.00.00.00.00.00.00668p6661.01.0146.407146830.0-0.9989762.3774e+060.004772091.15825e+060.00.00.00.00.00.0
40006354010658p6702SIMP66.11949688566.90872454255.4273e+081.01007e+10377.292 .. 0.00.5101930.0158.4290.0-6.94743-3.937032.16558229.3560.00.01400950.02.380480.525520.001354022.88385e-050.2208490.3615540.566060.917170.9482860.9887390.99573301010110115160.02.678330.03.211040.8935490.8057230.2353190.00.1369040.00.05580470.20861242.96482.193950.00.9476990.00.00.8268690.0030030000.00.00.00.00.00.00.00.00.00668p6660.00.00.00.00.00.00.00.00.450.450.00.00.00.0
40006354010658p6703EXP65.877951258866.90940458794.38489e+071.46808e+1112519.8 .. 11703.10.5573750.04122.780.024.2406-2.26082-377.466-366.0820.00.003787610.00.1449670.03848640.0001470724.89567e-060.1920610.3290890.5370410.9098660.9436410.9877040.99533900010610717170.06.73210.016.9821.754640.4774120.1015010.00.1778730.01.398635.161480.2502262.04850.00.7433760.00.00.3167830.0000000000.00.00.00.00.00.00.00.00.00668p6660.00.00.00.00.00.00.00.038.156777625.0-0.8783482.12995e+060.0009447544255.0
40006354010658p6704DEV65.884382599766.90890252061.82127e+085.45169e+101194.18 .. 729.0120.5557770.0433.2580.0-29.0117-9.50801-73.9846-568.5560.00.01753720.00.3776510.09455860.000316269.04275e-060.1929720.3301390.5379990.9101120.9437980.9877390.99535301010510816160.09.122320.013.74381.728270.6291490.1131170.01.238520.00.4833450.2223092.832230.5244320.00.8427010.00.00.5799860.0030030000.00.00.00.00.00.00.00.00.00668p6661.01.020.98196423.28-0.98780126188.20.068512743082.10.00.00.00.00.00.0
40006354010658p6705DEV65.88692098866.91437795033.87727e+092.05513e+101513.68 .. 1534.540.5574470.018.76070.025.599318.0026-33.9599-108.6990.04.422380.02.369730.5569490.00141912.92335e-050.192020.3290410.5369980.9098540.9436340.9877030.99533901010510516160.01.277610.061.51735.233490.6490460.1431240.02.37979e-050.00.07137210.1323430.3437491.321660.00.009271280.00.01.005240.0000000000.01.439070.00.010.1530.00.03.736770.00668p6661.01.00.470398728.064-0.0778361108.7240.224055181.6390.00.00.00.00.00.0
40006354010658p6706DEV65.740759573866.91130562626.51909e+085.73935e+104804.31 .. 7457.180.5882890.0209.790.075.146750.0695-44.771255.90920.00.0755170.00.9128340.2297990.0007078161.85822e-050.1752650.3094150.5188390.9051110.9406090.9870270.99508101010710817170.044.8360.01035.2362.70630.7984940.1397430.0-3.5227e-110.02.460352.404141.363936.950740.00.7574010.00.00.6883420.0040040000.00.00.00.00.00.00.00.00.00668p6661.01.07.0184101.636-0.9397246908.47-0.1227586419.660.00.00.00.00.00.0
40006354010658p6707DEV65.71857023766.91137932921.31202e+081.54705e+114598.37 .. 3980.310.5932590.01284.520.0-563.065-337.725-351.007287.9850.00.004075570.00.176520.04512310.0001514524.61117e-060.1727050.3063640.5159710.9043490.9401230.9869180.9950401010810916160.014.94230.03007.66180.1610.4058440.1008270.0-4.0628e-090.03.482383.835551.256342.45230.00.8454420.00.00.2791630.0010010000.00.00.00.00.00.00.00.00.00668p6661.01.045.615731747.7-0.983553113342.0-0.0318223119569.00.00.00.00.00.00.0
40006354010658p6708SIMP65.67870776866.91134907848.56763e+081.02459e+101456.06 .. 1496.320.601020.036.29650.08.122624.5523130.830943.9760.00.3558470.02.66010.6025190.001455683.10341e-050.1687830.3016590.5115240.903160.9393640.9867480.99497501011211317170.040.53370.01323.8614.89920.9915150.2069050.0-1.02553e-090.00.07491970.08643720.1014331.43620.00.7849690.00.00.9147110.0030030000.00.00.00.00.00.00.00.00.00668p6660.00.00.00.00.00.00.00.00.450.450.00.00.00.0
40006354010658p6709PSF65.989796132266.9109328337.72493e+074.59567e+0999.4883 .. 0.00.5342370.08.595880.074.000842.4494-69.8061-16.68880.01.374270.02.475480.5522120.00136342.83265e-050.2056770.3446280.5510810.913440.9459160.9882120.99553201010310415150.00.03038250.088.53647.711420.8454860.3045690.00.00.00.02997040.03090960.05543354.047830.00.8459320.00.00.9933740.0040040000.00.00.00.00.00.00.00.00.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
.................................................................................................................................................................................................................................................................................
40006354000651p6701284PSF65.323369439867.12394729173.06624e+101.25429e+116123.67 .. 0.00.708660.033.740.066.071933.265812.8436317.9690.05.379240.02.533520.5659490.001550353.06422e-050.1227290.2433890.4536540.8868350.9288990.9843930.99407801010410517170.00.7896320.07.71631.151950.7427960.2439630.00.00.00.01456370.01395710.1032460.2179240.00.001281490.00.01.003050.0000000000.01.469930.00.09.792580.00.03.349740.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701285PSF64.991697297967.1240466371.75825e+116.79699e+1131227.1 .. 31253.70.6724250.0107.8340.070.929437.3654-8.53234294.9750.02.685490.02.8620.6369590.00154243.16113e-050.1366250.2616250.4723640.8922970.9324090.9851850.9943801011511617170.01.980480.08.8611.791710.4573140.1416610.00.00.00.006655440.009793680.1050220.3762960.00.0002175990.00.01.004070.0000000000.01.469930.00.09.792580.00.03.349740.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701286PSF65.368756590667.12381327123.42514e+081.38894e+0982.0874 .. 0.00.7029330.02.892850.0-1.992616.138173.704898.66950.09.809420.02.560540.5605740.001454412.95592e-050.1248270.2461840.4565610.8876960.9294530.9845180.99412601010410416160.00.5592690.0796.63635.91420.4179570.1251650.00.00.019.16122.577393.675550.8424050.00.01540830.00.00.9991680.0000000000.01.469930.00.09.792580.00.03.349740.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701287PSF65.215854435967.124450386.45784e+092.60891e+101425.73 .. 0.00.7090120.013.80120.036.367820.006346.7205285.2440.07.48520.02.630950.5974070.001469893.00888e-050.1226010.2432180.4534760.8867820.9288650.9843850.99407501010911016160.00.679060.07.062160.7808850.575060.2496720.00.00.00.02537990.03937280.04447150.1594910.00.002250260.00.01.002420.0000000000.01.469930.00.09.792580.00.03.349740.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701288PSF65.187673944667.12409807515.30548e+082.03426e+09126.79 .. 0.00.7057010.03.628180.09.455613.54384-91.3356-179.8710.09.631680.02.723910.6190190.001473982.92692e-050.1238090.2448290.4551540.887280.9291850.9844580.99410301011111116160.00.556190.03.977580.7875990.7197260.1901090.00.00.00.002757150.001871720.005170610.05755320.00.01373790.00.00.9985470.0000000000.01.469930.00.09.792580.00.03.349740.00668p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701289DEV65.472757033967.12410423111.99856e+081.05377e+09112.276 .. 95.95680.6977740.010.68530.0127.88493.09951.1013244.5510.01.353210.01.476160.3355140.0009631512.38254e-050.1267480.248730.4591960.8884720.9299520.9846310.99416901010510515160.00.7905450.085.55963.568150.8821960.1921820.04.79349e-100.00.05946820.06294120.2162491.198840.00.119520.00.00.7591180.0000000000.01.469930.00.09.792580.00.03.349740.00668p6661.01.01.9866116.8262-0.0019257128.18530.074179684.50920.00.00.00.00.00.0
40006354000651p6701290PSF64.890734778567.12438265779.1484e+083.37207e+09229.173 .. 0.00.6476910.05.136610.013.25627.6040115.204975.03560.08.685810.02.835730.6534470.001563483.11861e-050.1470040.2748530.4855780.8960450.9348120.9857260.99458601011611817170.00.758020.014.50241.893760.6533310.1310070.00.00.00.2888510.2820730.548281.738460.00.009424790.00.01.003320.0000000000.01.469930.00.09.792580.00.03.349740.00630p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701291PSF64.896916101967.12458551922.42908e+099.10358e+09592.75 .. 0.00.6491540.08.557930.09.789510.847944-5.97872-15.72410.07.971320.02.836580.6519730.001567413.09989e-050.1463680.2740520.4847860.8958230.934670.9856940.99457401011611717170.00.557940.013.53561.981460.6898420.134570.00.00.00.4032663.529361.491728.358760.00.005560620.00.01.004620.0000000000.01.469930.00.09.792580.00.03.349740.00630p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701292PSF64.945564084867.12479507341.71846e+096.28892e+09412.084 .. 0.00.6607520.06.953950.014.517212.947231.3015454.2290.08.54030.02.799890.6437680.001508583.18034e-050.1414280.2677860.4785550.8940640.9335420.985440.99447701011311517170.00.385920.023.28593.952420.7267150.16160.00.00.00.01125810.00751240.0603890.1261140.00.005847330.00.01.003780.0000000000.01.469930.00.09.792580.00.03.349740.00630p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0
40006354000651p6701293PSF64.877322861567.12459956381.7692e+086.32096e+0845.0033 .. 0.00.6448250.02.206560.028.342422.410721.0344380.8820.09.243010.02.886760.660260.001567193.16408e-050.1482560.2764280.4871320.8964810.9350910.9857890.9946101011812017170.00.9356540.06.972171.601430.6940230.1819330.00.00.00.03192060.0200210.3498460.1550530.00.02841890.00.00.9957820.0000000000.01.469930.00.09.792580.00.03.349740.00630p6660.00.00.00.00.00.00.00.00.00.00.00.00.00.0

In [237]:
"""newra, newdec = xy2radec(8.37, -10.65, -138.345, -333.179)
8.927313423598427
-9.324956250231294"""

import desimodel.io
gfatable = desimodel.io.load_gfa()
gfatable
import desimodel.focalplane
tiles = desimodel.io.load_tiles()
#print(indices)
#indices = desimodel.footprint.find_tiles_over_point(tiles, 8.37, -10.65)
#[8254, 15072, 198, 2213, 4225, 6242, 8255, 10265, 12279]
#print(tiles[8254])
#tile index 8254 has tileid 23658

telra, teldec = desimodel.footprint.get_tile_radec(23658)
#print(telra, teldec)
ra, dec = desimodel.focalplane.xy2radec(7.11, -10.53, 116.279135121, -372.885546514)
#print(ra, dec)
#Certain gfa location is in ra, dec respectively 6.644525362152656 -9.055425745149217

In [238]:
def is_on_gfa(tileid, ra, dec):
    """
    Checks if a target is on any of the 10 GFAs given a tileid and an array of RA and Dec pointings. 
    Parameters
    ----------
    tileid: An integer representing the tile's unique ID which can retrieve its RA and Dec pointing
    ra: An array of RA values for locations in the sky
    dec: An array of declination values for locations in the sky
    """
    import desimodel.footprint
    import desimodel.io
    # If any calculated area is under the threshold area, it is mathematically impossible
    THRESHOLD_AREA = 469.7
    TOLERANCE = 100
    MIN_TOLERANCE = .001
    # The area boundary's value is the area of the gfa plus some tolerance. 
    AREA_BOUNDARY = 469.8037221 + MIN_TOLERANCE + TOLERANCE
    
    targetindices = []
    gfatable = desimodel.io.load_gfa()
    telra, teldec = desimodel.footprint.get_tile_radec(tileid)
    #print(telra, teldec)
    targetx, targety = desimodel.focalplane.radec2xy(telra, teldec, ra, dec)
    targetx = np.asarray(targetx)
    targety = np.asarray(targety)
    
    # Method to check if point is inside the rectangle
    for gfaid in range(0, 40, 4):
        # a1 through a4 are edge lengths of the rectangle formed by corners of the GFAs
        a1 = np.sqrt((gfatable['X'][gfaid] - gfatable['X'][gfaid + 1])**2
                    + (gfatable['Y'][gfaid] - gfatable['Y'][gfaid + 1])**2)
        a2 = np.sqrt((gfatable['X'][gfaid + 1] - gfatable['X'][gfaid + 2])**2
                    + (gfatable['Y'][gfaid + 1] - gfatable['Y'][gfaid + 2])**2)
        a3 = np.sqrt((gfatable['X'][gfaid + 2] - gfatable['X'][gfaid + 3])**2
                    + (gfatable['Y'][gfaid + 2] - gfatable['Y'][gfaid + 3])**2)
        a4 = np.sqrt((gfatable['X'][gfaid + 3] - gfatable['X'][gfaid])**2
                    + (gfatable['Y'][gfaid + 3] - gfatable['Y'][gfaid])**2)
        # b1 through b4 are the line segments from each corner to the target location
        b1 = np.sqrt((gfatable['X'][gfaid] - targetx)**2
                    + (gfatable['Y'][gfaid] - targety)**2)
        b2 = np.sqrt((gfatable['X'][gfaid + 1] - targetx)**2
                    + (gfatable['Y'][gfaid + 1] - targety)**2)
        b3 = np.sqrt((gfatable['X'][gfaid + 2] - targetx)**2
                    + (gfatable['Y'][gfaid + 2] - targety)**2)
        b4 = np.sqrt((gfatable['X'][gfaid + 3] - targetx)**2
                    + (gfatable['Y'][gfaid + 3] - targety)**2)
        # Calculating areas of triangles using Heron's Formula
        #gfaarea = a1 * a2
        #gfaarea2 = a2 * a3
        u1 = (a1 + b1 + b2) / 2.0
        u2 = (a2 + b2 + b3) / 2.0
        u3 = (a3 + b3 + b4) / 2.0
        u4 = (a4 + b4 + b1) / 2.0
        area1 = np.sqrt(u1 * (u1 - a1) * (u1 - b1) * (u1 - b2))
        area2 = np.sqrt(u2 * (u2 - a2) * (u2 - b2) * (u2 - b3))
        area3 = np.sqrt(u3 * (u3 - a3) * (u3 - b3) * (u3 - b4))
        area4 = np.sqrt(u4 * (u4 - a4) * (u4 - b4) * (u4 - b1))
        targetarea = area1 + area2 + area3 + area4
        
        assert np.all(targetarea > THRESHOLD_AREA)
        #use np.where!!!!!!!!!
        # This if statement may be redundant and thus unnecessary
        if(any(targetarea < AREA_BOUNDARY) and any(targetarea > THRESHOLD_AREA)):
            print("The target is on GFA", int(gfaid / 4))  
            newtargetindices = np.where(targetarea < AREA_BOUNDARY)
            targetindices.append(newtargetindices[0])
    """targetindices is an array of targets with their respective indices in the 
    RA and Dec list passed in that fall on certain GFAs denoted by the index 
    in the targetindices array."""
    return targetindices
        
        
#is_on_gfa(23658, 6.644525362152656, -9.055425745149217)
import desimodel.focalplane
#test point: (x,y) = (119, -380)
#test tileid = 23658
telra1, teldec1 = desimodel.footprint.get_tile_radec(23658)
testra, testdec = desimodel.focalplane.xy2radec(telra1, teldec1, -335, -210)
#is_on_gfa(23658, testra, testdec)

#print(testra, testdec)
testra2 = [testra, 6.644525362152656, 7]
testdec2 = [testdec, -9.055425745149217, -10]
is_on_gfa(23658, testra2, testdec2)

gfatable


7.11 -10.53
The target is on GFA 0
The target is on GFA 8
Out[238]:
<Table length=40>
PETALCORNERXYZQRADIUS_DEGRADIUS_MM
mmmmmmdegrees
int64int64float64float64float64float64float64float64
00116.279135121-372.885546514-17.053287.319358121.54426530071390.595017971
01121.005023896-387.4297715-18.487287.3450269871.5999816328405.886737469
0291.784287159-396.910065893-18.631283.020607591.60541232205407.384285137
0387.0587074141-382.364889847-17.198282.8267193011.54995479057392.150643917
10313.248421438-233.323583313-17.053323.319358121.54426530071390.595017971
11325.620626724-242.312300771-18.487323.3450269871.5999816328405.886737469
12307.552931346-267.157538162-18.631319.020607591.60541232205407.384285137
13295.180417053-258.167869637-17.198318.8267193011.54995479057392.150643917
20390.567457688-4.6399416638-17.053359.319358121.54426530071390.595017971
........................
72-405.84680909935.3599112033-18.631175.020607591.60541232205407.384285137
73-390.55324019135.3594980285-17.198174.8267193011.54995479057392.150643917
80-318.703000001-225.815999995-17.053215.319358121.54426530071390.595017971
81-331.075000003-234.805000001-18.487215.3450269871.5999816328405.886737469
82-349.121000002-209.943999995-18.631211.020607591.60541232205407.384285137
83-336.747999992-200.955000001-17.198210.8267193011.54995479057392.150643917
90-125.10482863-370.01790486-17.053251.319358121.54426530071390.595017971
91-129.83038525-384.56223777-18.487251.3450269871.5999816328405.886737469
92-159.04283509-375.05643893-18.631247.020607591.60541232205407.384285137
93-154.31646944-360.51151824-17.198246.8267193011.54995479057392.150643917

In [239]:
import matplotlib.pyplot as plt
#telra and teldec = 7.11 -10.53
"""mindec = -9.8
maxdec = -9.6
minra = 6.5
maxra = 8.47"""
mindec = -12.5
maxdec = -7
minra = 5.4
maxra = 8.9
ra = []
dec = []
import desimodel.focalplane
import desimodel.footprint

while mindec < maxdec:
    startra = minra
    while startra < maxra:
        ra.append(startra)
        dec.append(mindec)
        startra += .05
    mindec += .05

import desimodel.io
tiles = desimodel.io.load_tiles()
ra = np.asarray(ra)
dec = np.asarray(dec)

"""index = 0
for specific_tile in tiles:
    if(tiles[index]['TILEID'] == 23658):
        print(index)
    index += 1
#INDEX IS TILES[8254]"""
points = desimodel.footprint.find_points_in_tiles(tiles[8254], ra, dec)
"""for lists in points:
    if lists:
        print(lists)"""
#print(points)
new_ra = []
new_dec = []
for point_indices in points:
    plt.plot(ra[point_indices], dec[point_indices], 'b.')
    new_ra.append(ra[point_indices])
    new_dec.append(dec[point_indices])
targetindices = is_on_gfa(23658, new_ra, new_dec)
for gfaid in targetindices:
    for indices in gfaid:
        plt.plot(new_ra[indices], new_dec[indices], 'g.')
"""ra.append(8.452)
dec.append(-9.6977)
ra.append(6.644525362152656)
dec.append(-9.055)"""

"""targetindices = is_on_gfa(23658, ra, dec)
print(targetindices)
#print(tiles.dtype.names)
plt.plot(ra, dec, 'b.')
for gfaid in targetindices:
    for indices in gfaid:
        plt.plot(ra[indices], dec[indices], 'g.')
        #ra.remove(ra[indices])
        #dec.remove(dec[indices])"""
#savefig('entire_gfa_tolerance_100.jpg')


7.11 -10.53
The target is on GFA 0
The target is on GFA 1
The target is on GFA 2
The target is on GFA 3
The target is on GFA 4
The target is on GFA 5
The target is on GFA 6
The target is on GFA 7
The target is on GFA 8
The target is on GFA 9
Out[239]:
"targetindices = is_on_gfa(23658, ra, dec)\nprint(targetindices)\n#print(tiles.dtype.names)\nplt.plot(ra, dec, 'b.')\nfor gfaid in targetindices:\n    for indices in gfaid:\n        plt.plot(ra[indices], dec[indices], 'g.')\n        #ra.remove(ra[indices])\n        #dec.remove(dec[indices])"