Tutorial navigation:
previous     home     next

6.1 SourceList and AssociateList Exercises

  1. For the OmegaCAM data used in earlier execises, make a SourceList each for 2 ReducedScienceFrames (they overlap). Set the SExtractor detection threshold to 6.0

    Lets find the ReducedScienceFrames we made earlier and pick two:

    awe> reds = (ReducedScienceFrame.chip.name == 'ESO_CCD_#65').user_only().project_only()
    awe> filename1 = reds[0].filename
    awe> filename2 = reds[1].filename
    awe> p = Pars(SourceList, instrument='OMEGACAM')
    awe> p.SourceList.sexconf.DETECT_THRESH = 6.0
    awe> pars = p.get()
    awe> task = SourceListTask(filenames=[filename1], pars=pars, commit=1)
    awe> task.execute()
    awe> task = SourceListTask(filenames=[filename2], pars=pars, commit=1)
    awe> task.execute()

  2. For one of the SourceLists you just made, obtain the number of sources in the sourcelist, find the brightest source, and obtain its half-light radius.

    The final line printed by the task should have display the SourceList identifier (SLID), which can be used to query directly (use your own SLID instead of the one below):

    awe> sl = (SourceList.SLID == 11212841)[0]
    Alternatively, select the most recent SourceList created by yourself:
    awe> sl = (SourceList.SLID > 100000).user_only().max('SLID')
    Get the information from the SourceList:
    awe> print(sl.number_of_sources)
    awe> magsid = [(src['MAG_ISO'], src['SID']) for src in sl.sources]
    awe> magsid.sort()
    awe> print(magsid[0])
    awe> (-16.573373794555664, 230L)
    awe> sl.sources[230]['SID'], sl.sources[230]['FLUX_RADIUS']
    (230, 6.32753324508667)

  3. Find out the piece of sky covered by the USNO catalogue in the database.

    awe> usno = (SourceList.name == 'USNO-A2.0')[0]
    awe> RA, DEC = usno.sources.RA, usno.sources.DEC
    awe> print(max(RA), min(DEC), min(RA), max(DEC))
    This is the current coverage as of 7/7/2014 of the USNO-A2.0 catalogue in the Astro-WISE database.

  4. Find the B and R mags of the sources in the USNO catalog which are inside a distance of 0.1 degrees of position 12.0o mathend000# -29.0o mathend000#.

    awe> print(usno.info())
    awe> attrs = { 'RA': [], 'DEC': [], 'USNO_RMAG': [], 'USNO_BMAG': [] }
    awe> area = (12.0, -29.0, 0.1)
    awe> r = usno.sources.area_search(Area=area, attr_dict=attrs)
    awe> nos = len(r[usno.SLID])
    awe> for k in range(nos):
    ...   print(attrs['USNO_BMAG'][k], attrs['USNO_RMAG'][k])

  5. AssociateLists are (among others) used for the Global Astrometric Solution. We are going to inspect some of these lists in the database. These are easily found since their names all start with GAS:
    awe> task = AssociateListTask(ids=[(11212841, 's'), (11212851, 's')], commit=True)
    awe> task.execute()
    As before, the final line printed by the task shows the AssociateList identifier (ALID). Get it:
    awe> al = (AssociateList.ALID == 838511)[0]
    and confirm the sourcelists it has been made from and find out the pointing and corresponding CCD's.

    awe> for sl in al.sourcelists:
    ...    print(sl.frame.chip.name, sl.frame.astrom.CRVAL1, sl.frame.astrom.CRVAL2)

Tutorial navigation:
previous     home     next

page generated Tue Apr 4 14:30:07 CEST 2017