text
stringlengths
18
773k
def validate(self, size): """ Ensure that the size of the dimension matches the number of bands in the scale Raises: ValueError: when the dimension size and number of bands don't match """ msg = 'scale and array size must match, ' \ 'but were s...
def resampled( chunksize_bytes=DEFAULT_CHUNK_SIZE, resample_to=SR44100(), store_resampled=False): """ Create a basic processing pipeline that can resample all incoming audio to a normalized sampling rate for downstream processing, and store a convenient, compressed version for pl...
def audio_graph( chunksize_bytes=DEFAULT_CHUNK_SIZE, resample_to=SR44100(), store_fft=False): """ Produce a base class suitable as a starting point for many audio processing pipelines. This class resamples all audio to a common sampling rate, and produces a bark band spectrogram...
def with_onsets(fft_feature): """ Produce a mixin class that extracts onsets :param fft_feature: The short-time fourier transform feature :return: A mixin class that extracts onsets """ class Onsets(BaseModel): onset_prep = ArrayWithUnitsFeature( SlidingWindow, n...
def keplerian_sheared_field_locations(ax, kbos, date, ras, decs, names, elongation=False, plot=False): """ Shift fields from the discovery set to the requested date by the average motion of L7 kbos in the discovery field. :param ras: :param decs: :param plot: :param ax: :param kbos: precompu...
def field_elongation(ra, dec, date): """ For a given field, calculate the solar elongation at the given date. :param ra: field's right ascension. unit="h" format="RAh:RAm:RAs" :param dec: field's declination. degrees :param date: date at which to calculate elongation :return: elongation from t...
def str_to_timedelta(value: str, fmt: str = None) -> Optional[datetime.timedelta]: """ Convert string value to timedelta instance according to the given format. If format not set function tries to load timedelta using default ``TIMEDELTA_FORMAT`` and then both of magic "full" forma...
def timedelta_average(*values: datetime.timedelta) -> datetime.timedelta: r"""Compute the arithmetic mean for timedeltas list. :param \*values: Timedelta instances to process. """ if isinstance(values[0], (list, tuple)): values = values[0] return sum(values, datetime.timedelta()) // len(val...
def timedelta_div(first: datetime.timedelta, second: datetime.timedelta) -> Optional[float]: """Implement divison for timedelta instances. :param first: First timedelta instance. :param second: Second timedelta instance. """ first_seconds = timedelta_seconds(first) second_seco...
def timedelta_seconds(value: datetime.timedelta) -> int: """Return full number of seconds from timedelta. By default, Python returns only one day seconds, not all timedelta seconds. :param value: Timedelta instance. """ return SECONDS_PER_DAY * value.days + value.seconds
def timedelta_to_str(value: datetime.timedelta, fmt: str = None) -> str: """Display the timedelta formatted according to the given string. You should use global setting ``TIMEDELTA_FORMAT`` to specify default format to this function there (like ``DATE_FORMAT`` for builtin ``date`` template filter). ...
def align(expnums, ccd, version='s', dry_run=False): """Create a 'shifts' file that transforms the space/flux/time scale of all images to the first image. This function relies on the .fwhm, .trans.jmp, .phot and .zeropoint.used files for inputs. The scaling we are computing here is for use in planting sour...
def dist(self): """ How should the values in range be sampled, uniformly or via some function. :return: """ if self.func is None: return random.uniform(self.min, self.max) if self._dist is None: x = numpy.arange(self.min, self.max, (self.max-self.m...
def next(self): """ :return: a set of values that can be used for an planted object builder. """ # x y mag pix rate angle ''/h rate id # 912.48 991.06 22.01 57.32 -45.23 10.60 0 self._n -= 1 if self._n...
def send_command(self, cmd, params=None, raw=False): ''' Send command to foscam. ''' paramstr = '' if params: paramstr = urlencode(params) paramstr = '&' + paramstr if paramstr else '' cmdurl = 'http://%s/cgi-bin/CGIProxy.fcgi?usr=%s&pwd=%s&cmd=%s%...
def execute_command(self, cmd, params=None, callback=None, raw=False): ''' Execute a command and return a parsed response. ''' def execute_with_callbacks(cmd, params=None, callback=None, raw=False): code, params = self.send_command(cmd, params, raw) if callback: ...
def set_ip_info(self, is_dhcp, ip='', gate='', mask='', dns1='', dns2='', callback=None): ''' isDHCP: 0(False), 1(True) System will reboot automatically to take effect after call this CGI command. ''' params = {'isDHCP': is_dhcp, ...
def set_port_info(self, webport, mediaport, httpsport, onvifport, callback=None): ''' Set http port and media port of camera. ''' params = {'webPort' : webport, 'mediaPort' : mediaport, 'httpsPort' : httpsport, ...
def get_wifi_list(self, startno, callback=None): ''' Get the aps around after refreshWifiList. Note: Only 10 aps will be returned one time. ''' params = {'startNo': startno} return self.execute_command('getWifiList', params, callback=callback)
def set_wifi_setting(self, ssid, psk, isenable, isusewifi, nettype, encryptype, authmode, keyformat, defaultkey, key1='', key2='', key3='', key4='', key1len=64, key2len=64, key3len=64, key4len=64, callback=No...
def set_upnp_config(self, isenable, callback=None): ''' Set UPnP config ''' params = {'isEnable': isenable} return self.execute_command('setUPnPConfig', params, callback=callback)
def set_ddns_config(self, isenable, hostname, ddnsserver, user, password, callback=None): ''' Set DDNS config. ''' params = {'isEnable': isenable, 'hostName': hostname, 'ddnsServer': ddnsserver, ...
def set_sub_video_stream_type(self, format, callback=None): ''' Set the stream fromat of sub stream. Supported format: (1) H264 : 0 (2) MotionJpeg 1 ''' params = {'format': format} return self.execute_command('setSubVideoStreamType', ...
def set_sub_stream_format(self, format, callback=None): ''' Set the stream fromat of sub stream???? ''' params = {'format': format} return self.execute_command('setSubStreamFormat', params, callback=callback)
def set_main_video_stream_type(self, streamtype, callback=None): ''' Set the stream type of main stream ''' params = {'streamType': streamtype} return self.execute_command('setMainVideoStreamType', params, callback=callback)
def set_video_stream_param(self, streamtype, resolution, bitrate, framerate, gop, isvbr, callback=None): ''' Set the video stream param of stream N streamtype(0~3): Stream N. resolution(0~4): 0 720P, 1 VGA(640*480), 2 VGA(640*...
def mirror_video(self, is_mirror, callback=None): ''' Mirror video ``is_mirror``: 0 not mirror, 1 mirror ''' params = {'isMirror': is_mirror} return self.execute_command('mirrorVideo', params, callback=callback)
def flip_video(self, is_flip, callback=None): ''' Flip video ``is_flip``: 0 Not flip, 1 Flip ''' params = {'isFlip': is_flip } return self.execute_command('flipVideo', params, callback=callback)
def change_user_name(self, usrname, newusrname, callback=None): ''' Change user name. ''' params = {'usrName': usrname, 'newUsrName': newusrname, } return self.execute_command('changeUserName', params, callback=callback)
def change_password(self, usrname, oldpwd, newpwd, callback=None): ''' Change password. ''' params = {'usrName': usrname, 'oldPwd' : oldpwd, 'newPwd' : newpwd, } return self.execute_command('changePassword', ...
def set_system_time(self, time_source, ntp_server, date_format, time_format, time_zone, is_dst, dst, year, mon, day, hour, minute, sec, callback=None): ''' Set systeim time ''' if ntp_server not in ['time.nist.gov', ...
def set_dev_name(self, devname, callback=None): ''' Set camera name ''' params = {'devName': devname.encode('gbk')} return self.execute_command('setDevName', params, callback=callback)
def set_infra_led_config(self, mode, callback=None): ''' Set Infrared LED configuration cmd: setInfraLedConfig mode(0,1): 0=Auto mode, 1=Manual mode ''' params = {'mode': mode} return self.execute_command('setInfraLedConfig', params, callback=callback)
def ptz_goto_preset(self, name, callback=None): ''' Move to preset. ''' params = {'name': name} return self.execute_command('ptzGotoPresetPoint', params, callback=callback)
def set_motion_detection(self, enabled=1): ''' Get the current config and set the motion detection on or off ''' result, current_config = self.get_motion_detect_config() if result != FOSCAM_SUCCESS: return result current_config['isEnable'] = enabled se...
def set_motion_detection1(self, enabled=1): ''' Get the current config and set the motion detection on or off ''' result, current_config = self.get_motion_detect_config1() if result != FOSCAM_SUCCESS: return result current_config['isEnable'] = enabled ...
def set_alarm_record_config(self, is_enable_prerecord=1, prerecord_secs=5, alarm_record_secs=300, callback=None): ''' Set alarm record config Return: set result(0-success, -1-error) ''' params = {'isEnablePreRecord': is_enable_prerecord, ...
def set_local_alarm_record_config(self, is_enable_local_alarm_record = 1, local_alarm_record_secs = 30, callback=None): ''' Set local alarm-record config `is_enable_local_alarm_record`: 0 disable, 1 enable ''' params = {'isEnableLocalAlarmRec...
def set_h264_frm_ref_mode(self, mode=1, callback=None): ''' Set frame shipping reference mode of H264 encode stream. params: `mode`: see docstr of meth::get_h264_frm_ref_mode ''' params = {'mode': mode} return self.execute_command('setH264FrmRefMode', params, ...
def set_schedule_record_config(self, is_enable, record_level, space_full_mode, is_enable_audio, schedule0 = 0, schedule1 = 0, schedule2 = 0, schedule3 = 0, schedule4 = 0, schedule5 = 0, ...
def set_record_path(self, path, callback=None): ''' Set Record path: sd/ftp cmd: setRecordPath param: path: (0,SD), (2, FTP) ''' params = {'Path': path} return self.execute_command('setRecordPath', params, callback=callback)
def get_log(self, offset, count=10, callback=None): ''' Retrieve log records from camera. cmd: getLog param: offset: log offset for first record count: number of records to return ''' params = {'offset': offset, 'count': count} return self.ex...
def get_apcor(expnum, ccd, version='p', prefix=None): """ retrieve the aperture correction for this exposure @param expnum: @param ccd: @param version: @param prefix: @return: """ uri = get_uri(expnum, ccd, ext=APCOR_EXT, version=version, prefix=prefix) apcor_file_name = tempfile...
def cone_search(ra, dec, dra=0.01, ddec=0.01, mjdate=None, calibration_level=2, use_ssos=True, collection='CFHTMEGAPIPE'): """Do a QUERY on the TAP service for all observations that are part of OSSOS (*P05/*P016) where taken after mjd and have calibration 'observable'. @param ra: RA center ...
def populate(dataset_name, data_web_service_url=DATA_WEB_SERVICE + "CFHT"): """Given a dataset_name created the desired dbimages directories and links to the raw data files stored at CADC. @param dataset_name: the name of the CFHT dataset to make a link to. @param data_web_servica_url: the URL of the da...
def get_cands_uri(field, ccd, version='p', ext='measure3.cands.astrom', prefix=None, block=None): """ return the nominal URI for a candidate file. @param field: the OSSOS field name @param ccd: which CCD are the candidates on @param version: either the 'p', or 's' (scrambled) ...
def get_uri(expnum, ccd=None, version='p', ext=FITS_EXT, subdir=None, prefix=None): """ Build the uri for an OSSOS image stored in the dbimages containerNode. :rtype : basestring expnum: CFHT exposure number ccd: CCD in the mosaic [0-35] version: one of p,s,o etc. ...
def get_tag(expnum, key): """given a key, return the vospace tag value. @param expnum: Number of the CFHT exposure that a tag value is needed for @param key: The process tag (such as mkpsf_00) that is being looked up. @return: the value of the tag @rtype: str """ uri = tag_uri(key) for...
def get_process_tag(program, ccd, version='p'): """ make a process tag have a suffix indicating which ccd its for. @param program: Name of the process that a tag is built for. @param ccd: the CCD number that this process ran on. @param version: The version of the exposure (s, p, o) that the process ...
def get_status(task, prefix, expnum, version, ccd, return_message=False): """ Report back status of the given program by looking up the associated VOSpace annotation. @param task: name of the process or task that will be checked. @param prefix: prefix of the file that was processed (often fk or None) ...
def set_status(task, prefix, expnum, version, ccd, status): """ set the processing status of the given program. @param task: name of the processing task @param prefix: was there a prefix on the exposure number processed? @param expnum: exposure number processed. @param version: which version of ...
def _cutout_expnum(observation, sky_coord, radius): """ Get a cutout from an exposure based on the RA/DEC location. @param observation: The Observation object that contains the expusre number information. @type observation: Observation @param sky_coord: which RA/DEC is needed, @type sky_coord: ...
def frame2expnum(frameid): """Given a standard OSSOS frameid return the expnum, version and ccdnum as a dictionary.""" result = {} parts = re.search('(?P<expnum>\d{7})(?P<type>\S)(?P<ccd>\d\d)', frameid) assert parts is not None result['expnum'] = parts.group('expnum') result['ccd'] = parts.grou...
def get_image(expnum, ccd=None, version='p', ext=FITS_EXT, subdir=None, prefix=None, cutout=None, return_file=True, flip_image=True): """Get a FITS file for this expnum/ccd from VOSpace. @param cutout: (str) @param return_file: return an filename (True) or HDUList (False) @param expnum:...
def reset_datasec(cutout, datasec, naxis1, naxis2): """ reset the datasec to account for a possible cutout. @param cutout: @param datasec: @param naxis1: size of the original image in the 'x' direction @param naxis2: size of the oringal image in the 'y' direction @return: """ if cu...
def get_hdu(uri, cutout=None): """Get a at the given uri from VOSpace, possibly doing a cutout. If the cutout is flips the image then we also must flip the datasec keywords. Also, we must offset the datasec to reflect the cutout area being used. @param uri: The URI in VOSpace of the image to HDU to r...
def get_fwhm_tag(expnum, ccd, prefix=None, version='p'): """ Get the FWHM from the VOSpace annotation. @param expnum: @param ccd: @param prefix: @param version: @return: """ uri = get_uri(expnum, ccd, version, ext='fwhm', prefix=prefix) if uri not in fwhm: key = "fwhm_{:...
def get_fwhm(expnum, ccd, prefix=None, version='p'): """Get the FWHM computed for the given expnum/ccd combo. @param expnum: @param ccd: @param prefix: @param version: @return: """ uri = get_uri(expnum, ccd, version, ext='fwhm', prefix=prefix) filename = os.path.basename(uri) ...
def _get_zeropoint(expnum, ccd, prefix=None, version='p'): """ Retrieve the zeropoint stored in the tags associated with this image. @param expnum: Exposure number @param ccd: ccd of the exposure @param prefix: possible prefix (such as 'fk') @param version: which version: p, s, or o ? @retur...
def get_zeropoint(expnum, ccd, prefix=None, version='p'): """Get the zeropoint for this exposure using the zeropoint.used file created during source planting.. This command expects that there is a file called #######p##.zeropoint.used which contains the zeropoint. @param expnum: exposure to get zeropoint ...
def mkdir(dirname): """make directory tree in vospace. @param dirname: name of the directory to make """ dir_list = [] while not client.isdir(dirname): dir_list.append(dirname) dirname = os.path.dirname(dirname) while len(dir_list) > 0: logging.info("Creating directory:...
def vofile(filename, **kwargs): """ Open and return a handle on a VOSpace data connection @param filename: @param kwargs: @return: """ basename = os.path.basename(filename) if os.access(basename, os.R_OK): return open(basename, 'r') kwargs['view'] = kwargs.get('view', 'data')...
def open_vos_or_local(path, mode="rb"): """ Opens a file which can either be in VOSpace or the local filesystem. @param path: @param mode: @return: """ filename = os.path.basename(path) if os.access(filename, os.F_OK): return open(filename, mode) if path.startswith("vos:"): ...
def copy(source, dest): """ use the vospace service to get a file. @param source: @param dest: @return: """ logger.info("copying {} -> {}".format(source, dest)) return client.copy(source, dest)
def vlink(s_expnum, s_ccd, s_version, s_ext, l_expnum, l_ccd, l_version, l_ext, s_prefix=None, l_prefix=None): """make a link between two version of a file. @param s_expnum: @param s_ccd: @param s_version: @param s_ext: @param l_expnum: @param l_ccd: @param l_version: @par...
def delete(expnum, ccd, version, ext, prefix=None): """ delete a file, no error on does not exist @param expnum: @param ccd: @param version: @param ext: @param prefix: @return: """ uri = get_uri(expnum, ccd=ccd, version=version, ext=ext, prefix=prefix) remove(uri)
def my_glob(pattern): """ get a listing matching pattern @param pattern: @return: """ result = [] if pattern[0:4] == 'vos:': dirname = os.path.dirname(pattern) flist = listdir(dirname) for fname in flist: fname = '/'.join([dirname, fname]) if ...
def has_property(node_uri, property_name, ossos_base=True): """ Checks if a node in VOSpace has the specified property. @param node_uri: @param property_name: @param ossos_base: @return: """ if get_property(node_uri, property_name, ossos_base) is None: return False else: ...
def get_property(node_uri, property_name, ossos_base=True): """ Retrieves the value associated with a property on a node in VOSpace. @param node_uri: @param property_name: @param ossos_base: @return: """ # Must use force or we could have a cached copy of the node from before # prope...
def set_property(node_uri, property_name, property_value, ossos_base=True): """ Sets the value of a property on a node in VOSpace. If the property already has a value then it is first cleared and then set. @param node_uri: @param property_name: @param property_value: @param ossos_base: ...
def build_counter_tag(epoch_field, dry_run=False): """ Builds the tag for the counter of a given epoch/field, without the OSSOS base. @param epoch_field: @param dry_run: @return: """ logger.info("Epoch Field: {}, OBJECT_COUNT {}".format(str(epoch_field), str(OBJECT_COUNT))) tag = epoch_...
def read_object_counter(node_uri, epoch_field, dry_run=False): """ Reads the object counter for the given epoch/field on the specified node. @param node_uri: @param epoch_field: @param dry_run: @return: the current object count. """ return get_property(node_uri, build_counter_tag(epoch_...
def increment_object_counter(node_uri, epoch_field, dry_run=False): """ Increment the object counter used to create unique object identifiers. @param node_uri: @param epoch_field: @param dry_run: @return: The object count AFTER incrementing. """ current_count = read_object_counter(node...
def get_mopheader(expnum, ccd, version='p', prefix=None): """ Retrieve the mopheader, either from cache or from vospace @param expnum: @param ccd: @param version: @param prefix: @return: Header """ prefix = prefix is None and "" or prefix mopheader_uri = dbimages_uri(expnum=expn...
def _get_sghead(expnum): """ Use the data web service to retrieve the stephen's astrometric header. :param expnum: CFHT exposure number you want the header for :rtype : list of astropy.io.fits.Header objects. """ version = 'p' key = "{}{}".format(expnum, version) if key in sgheaders: ...
def get_header(uri): """ Pull a FITS header from observation at the given URI @param uri: The URI of the image in VOSpace. """ if uri not in astheaders: astheaders[uri] = get_hdu(uri, cutout="[1:1,1:1]")[0].header return astheaders[uri]
def get_astheader(expnum, ccd, version='p', prefix=None): """ Retrieve the header for a given dbimages file. @param expnum: CFHT odometer number @param ccd: which ccd based extension (0..35) @param version: 'o','p', or 's' @param prefix: @return: """ logger.debug("Getting ast heade...
def tag(self): """ Get the string representation of the tag used to annotate the status in VOSpace. @return: str """ return "{}{}_{}{:02d}".format(self.target.prefix, self, self.target.version, ...
def scramble(expnums, ccd, version='p', dry_run=False): """run the plant script on this combination of exposures""" mjds = [] fobjs = [] for expnum in expnums: filename = storage.get_image(expnum, ccd=ccd, version=version) fobjs.append(fits.open(filename)) # Pull out values to r...
def main(): """Run the script.""" parser = argparse.ArgumentParser() parser.add_argument('--ccd', action='store', type=int, default=None, help='which ccd to process') parser.add_argument("--dbimages", ...
def mk_mopheader(expnum, ccd, version, dry_run=False, prefix=""): """Run the OSSOS mopheader script. """ ## confirm destination directory exists. destdir = os.path.dirname( storage.dbimages_uri(expnum, ccd, prefix=prefix, version=version, ext='fits')) if not dry_run: storage.mkdir(d...
def read_cands(filename): """Read in the contents of a cands comb file""" import sre lines=file(filename).readlines() exps=[] cands=[] coo=[] for line in lines: if ( line[0:2]=="##" ) : break exps.append(line[2:].strip()) for line in lines: if ( ...
def discands(record): """Display the candidates contained in a candidate record list""" import pyraf, pyfits pyraf.iraf.tv() display = pyraf.iraf.tv.display width=128 cands = record['cands'] exps= record['fileId'] ### load some header info from the mophead file headers=...
def query_for_observations(mjd, observable, runid_list): """Do a QUERY on the TAP service for all observations that are part of runid, where taken after mjd and have calibration 'observable'. Schema is at: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/tap/tables mjd : float observable: str ( 2 or ...
def create_ascii_table(observation_table, outfile): """Given a table of observations create an ascii log file for easy parsing. Store the result in outfile (could/should be a vospace dataNode) observation_table: astropy.votable.array object outfile: str (name of the vospace dataNode to store the result...
def create_sky_plot(observation_table, outfile): """Given a VOTable that describes the observation coverage provide a PDF of the skycoverge. observation_table: vostable.arrary outfile: name of file to write results to. """ # camera dimensions width = 0.98 height = 0.98 ax = None i...
def load_observations((observations, regex, rename), path, filenames): """ Returns a provisional name based dictionary of observations of the object. Each observations is keyed on the date. ie. a dictionary of dictionaries. :rtype : None :param observations: dictionary to store observtions into ...
def writeto(self, filename, **kwargs): """ Write the header to a fits file. :param filename: :return: """ fits.PrimaryHDU(header=self).writeto(filename, output_verify='ignore', **kwargs)
def crpix(self): """ The location of the reference coordinate in the pixel frame. First simple respond with the header values, if they don't exist try usnig the DETSEC values @rtype: float, float """ try: return self.wcs.crpix1, self.wcs.crpix2 except...
def mjd_obsc(self): """Given a CFHT Megaprime image header compute the center of exposure. This routine uses the calibration provide by Richard Wainscoat: From: Richard Wainscoat <rjw@ifa.hawaii.edu> Subject: Fwd: timing for MegaCam Date: April 24, 2015 at 7:23:09 PM EDT ...
def crval(self): """ Get the world coordinate of the reference pixel. @rtype: float, float """ try: return self.wcs.crval1, self.wcs.crval2 except Exception as ex: logging.debug("Couldn't get CRVAL from WCS: {}".format(ex)) logging.deb...
def pixscale(self): """Return the pixel scale of the detector, in arcseconds. This routine first attempts to compute the size of a pixel using the WCS. Then looks for PIXSCAL in header. @return: pixscal @rtype: float """ try: (x, y) = self['NAXIS1'] / 2.0, ...
def iraf_phot(f,x,y,zmag=26.5,apin=10,skyin=15,skywidth=10): """Compute the magnitude of the star at location x/y""" import pyfits import re infits=pyfits.open(f,'update') f=re.sub(r'.fits$','',f) ### Get my python routines from pyraf import iraf from pyraf.irafpar import IrafParLis...
def get_rates(file,au_min=25,au_max=150): """ Use the rates program to determine the minimum and maximum bounds for planting""" import os, string rate_command='rate.pl --file %s %d ' % ( file, au_min) rate=os.popen(rate_command) line=rate.readline() print line rate.close() (min_rate, mi...
def kbo_gen(file,outfile='objects.list',mmin=22.5,mmax=24.5): """Generate a file with object moving at a range of rates and angles""" header=get_rates(file) print header import pyfits hdulist=pyfits.open(file) header['xmin']=1 header['xmax']=hdulist[0].header.get('NAXIS1',2048) header['...
def main(): """ Input asteroid family, filter type, and image type to query SSOIS """ parser = argparse.ArgumentParser(description='Run SSOIS and return the available images in a particular filter.') parser.add_argument("--filter", action="store", de...
def get_family_info(familyname, filtertype='r', imagetype='p'): """ Query the ssois table for images of objects in a given family. Then parse through for desired image type, filter, exposure time, and telescope instrument """ # establish input family_list = '{}/{}_family.txt'.format(_FAMILY_LIS...
def get_member_info(object_name, filtertype='r', imagetype='p'): """ Query the ssois table for images of a given object. Then parse through for desired image type, filter, exposure time, and telescope instrument """ # From the given input, identify the desired filter and rename appropriately ...
def parse_ssois_return(ssois_return, object_name, imagetype, camera_filter='r.MP9601', telescope_instrument='CFHT/MegaCam'): """ Parse through objects in ssois query and filter out images of desired filter, type, exposure time, and instrument """ assert camera_filter in ['r.MP960...
def match_mopfiles(mopfile1, mopfile2): """ Given an input list of 'real' detections and candidate detections provide a result file that contains the measured values from candidate detections with a flag indicating if they are real or false. @rtype MOPFile @return mopfile2 with a new column contain...