; return the list of object names function objname, datestr, nobj, trim=trim, nocal=nocal foo = rdnight(datestr, indx0, n, h, /nodata, $ dateobs=dateobs, utc=utc, airmass=airmass, rditime=rditime, $ itime=itime, object=object, obstype=obstype, coadds=coadds, numfs=numfs, $ targra=targra, targdec=targdec, targname=targname, rotposn=rotposn, rotmode=rotmode) indx = indgen(n)+indx0 s = object[sort(object)] uniqobjects = s[uniq(s)] & delvarx, s if keyword_set(nocal) then begin indx = where( ~(strmatch(uniqobjects, '*FLAT*') or strmatch(uniqobjects, '*G191B2B*')), nobj) if nobj eq 0 then return, -1 uniqobjects = uniqobjects[indx] endif if keyword_set(trim) then uniqobjects = strtrim(uniqobjects, 2) nobj = n_elements(uniqobjects) return, uniqobjects end