#NEWLINE# def __init__( self , obs_config = dict ( ) , cameras = None , target_dir = None , visit_num = None ) : #NEWLINE# #INDENT# "An object which describes a single observation.\n\n        Each observation can have a number of different `Exposure`s based on the config settings.\n        For each type of exposure ('primary' or 'secondary') there are `[type]_nexp` `Exposure`\n            objects created. Each of these `Exposure`s has a list of cameras. (See `Exposure` for details)\n\n        Example::\n\n              - analyze: false\n                primary_exptime: 300\n                primary_filter: null\n                primary_nexp: 3\n                secondary_exptime: 300\n                secondary_filter: null\n                secondary_nexp: 3\n\n        Args:\n            obs_config (dictionary): a dictionary describing the observation as read from\n                the YAML file, see Example.\n            cameras(list[panoptes.camera]): A list of `panoptes.camera` objects to use for\n                this observation.\n\n        " #NEWLINE# self . config = load_config ( ) #NEWLINE# self . logger = get_logger ( self ) #NEWLINE# self . cameras = cameras #NEWLINE# self . logger . debug ( 'Cameras for Observation: {}' . format ( cameras ) ) #NEWLINE# self . exposures = self . _create_exposures ( obs_config ) #NEWLINE# if ( target_dir is None ) : #NEWLINE# #INDENT# self . _images_dir = self . config [ 'directories' ] [ 'images' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _images_dir = target_dir #NEWLINE# #UNINDENT# if ( visit_num is None ) : #NEWLINE# #INDENT# self . _visit_num = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _visit_num = visit_num #NEWLINE# #UNINDENT# self . reset_exposures ( )