Example #1
0
 def output_stream(dd, state, output_sampling=None, **options):
     # if output_sampling is not None:
     # 	state['aggregate_state'] = state.get('aggregate_state', {})
     # 	dd = misc.aggregate(dd, state['aggregate_state'],
     # 		output_sampling/60./60./24.
     # 	)
     return misc.stream(dd, state, write, output=output)
Example #2
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
Example #3
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
Example #4
0
def read_stream(dd, state):
    return misc.stream(dd, state, read)
Example #5
0
def stream(dd, state, dirname):
    if 'd_idx' not in state:
        d_idx = ds.readdir(dirname, ['time'], merge='time')
        state['d_idx'] = d_idx
    return misc.stream(dd, state, couple, d_idx=state['d_idx'])
Example #6
0
def stream(dd, state, **options):
    return misc.stream(dd, state, lidar_ratio, **options)
Example #7
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)
Example #8
0
def stream(dd, state, zres=None, zlim=None, **options):
    return misc.stream(dd, state, zsample, zres=zres, zlim=zlim)
Example #9
0
def stream(dd, state, **options):
	return misc.stream(dd, state, calibration, **options)
Example #10
0
def stream(dd, state, **options):
    return misc.stream(dd, state, cloud_detection, **options)