Ejemplo n.º 1
0
def stream(dd, state, tres=None, tlim=None, output_sampling=None, **options):
	if tres is not None:
		state['aggregate_state'] = state.get('aggregate_state', {})
		dd = misc.aggregate(dd, state['aggregate_state'], output_sampling)
		return misc.stream(dd, state, output_sample,
			tres=tres,
			output_sampling=output_sampling
		)
	return dd
Ejemplo n.º 2
0
 def process(dd, state, **options):
     state['preprocess'] = state.get('preprocess', {})
     state['noise_removal'] = state.get('noise_removal', {})
     state['calibration'] = state.get('calibration', {})
     state['tsample'] = state.get('tsample', {})
     state['zsample'] = state.get('zsample', {})
     state['output_sample'] = state.get('output_sample', {})
     state['cloud_detection'] = state.get('cloud_detection', {})
     state['cloud_base_detection'] = state.get('cloud_base_detection', {})
     state['lidar_ratio'] = state.get('lidar_ratio', {})
     state['output'] = state.get('output', {})
     state['couple'] = state.get('couple', {})
     dd = misc.stream(dd, state['preprocess'], preprocess, tshift=tshift)
     if couple is not None:
         dd = couple_mod.stream(dd, state['couple'], couple)
     if noise_removal_mod is not None:
         dd = noise_removal_mod.stream(dd, state['noise_removal'],
                                       **options)
     if calibration_mod is not None:
         dd = calibration_mod.stream(dd, state['calibration'], **options)
     if zres is not None or zlim is not None:
         dd = zsample.stream(dd, state['zsample'], zres=zres, zlim=zlim)
     if tres is not None or tlim is not None:
         dd = tsample.stream(dd,
                             state['tsample'],
                             tres=tres / 86400.,
                             tlim=tlim)
     if output_sampling is not None:
         dd = output_sample.stream(
             dd,
             state['output_sample'],
             tres=tres / 86400.,
             output_sampling=output_sampling / 86400.,
         )
         dd = misc.aggregate(dd, state['output_sample'],
                             output_sampling / 86400.)
     if cloud_detection_mod is not None:
         dd = cloud_detection_mod.stream(dd, state['cloud_detection'],
                                         **options)
     if cloud_base_detection_mod is not None:
         dd = cloud_base_detection_mod.stream(dd,
                                              state['cloud_base_detection'],
                                              **options)
     dd = lidar_ratio.stream(dd, state['lidar_ratio'])
     dd = output_stream(
         dd, state['output'])  #, output_sampling=output_sampling)
     return dd
Ejemplo n.º 3
0
def stream(dd, state, noise_removal_sampling=300, **options):
    state['aggregate_state'] = state.get('aggregate_state', {})
    dd = misc.aggregate(dd, state['aggregate_state'],
                        noise_removal_sampling / 60. / 60. / 24.)
    return misc.stream(dd, state, noise_removal, **options)