@@ -269,15 +269,28 @@ def output_tpu_to_las_extra_bytes(self, las, data_to_output):
269
269
extra_byte_df = pd .DataFrame (tpu_data [:, 0 :num_extra_bytes ],
270
270
index = tpu_data [:, num_extra_bytes ],
271
271
columns = extra_byte_dimensions .keys ())
272
+
273
+ print (f'extra_byte_df' )
274
+ print (extra_byte_df )
275
+
276
+ print (f'las.num_file_points' )
277
+ print (las .num_file_points )
278
+
279
+ print ('las.t_argsort' )
280
+ print (las .t_argsort )
272
281
273
282
if extra_byte_df .shape [0 ] == las .num_file_points :
274
283
extra_byte_df = extra_byte_df .sort_index ()
284
+ print (f'extra_byte_df --------- sort.index()' )
285
+ print (extra_byte_df )
275
286
else :
276
- '''fill data points for which TPU was not calculated
277
- with no_data_value (also sorts by index, or t_idx)'''
287
+ logging .info ("""
288
+ filling data points for which TPU was not calculated
289
+ with no_data_value (also sorting by index, or t_idx)
290
+ """ )
278
291
no_data_value = - 1
279
- extra_byte_df = extra_byte_df .reindex (las .t_argsort ,
280
- fill_value = no_data_value )
292
+ extra_byte_df = extra_byte_df .reindex (las .t_argsort ,
293
+ fill_value = no_data_value ). sort_index ()
281
294
282
295
logging .debug ('populating extra byte data for total_thu...' )
283
296
out_las .total_thu = extra_byte_df ['total_thu' ]
@@ -337,12 +350,13 @@ def write_metadata(self, las):
337
350
def run_tpu_multiprocess (self , num_las , sbet_las_generator ):
338
351
"""runs the tpu calculations using multiprocessing
339
352
340
- This methods initiates the tpu calculations using the pathos multiprocessing
341
- framework (https://pypi.org/project/pathos/). Whether the tpu calculations
342
- are done with multiprocessing or not is currently determined by which
343
- "run_tpu_*" method is manually specified in the tpu_process_callback()
344
- method of the CBlueApp class. TODO: Include
345
- a user option to select single processing or multiprocessing
353
+ This methods initiates the tpu calculations using the pathos
354
+ multiprocessing framework (https://pypi.org/project/pathos/).
355
+ Whether the tpu calculations are done with multiprocessing or not is
356
+ currently determined by which "run_tpu_*" method is manually specified
357
+ in the tpu_process_callback() method of the CBlueApp class.
358
+
359
+ TODO: Include user option to select single processing or multiprocessing
346
360
347
361
:param sbet_las_generator:
348
362
:return:
@@ -351,7 +365,8 @@ def run_tpu_multiprocess(self, num_las, sbet_las_generator):
351
365
print ('Calculating TPU (multi-processing)...' )
352
366
p = pp .ProcessPool (2 )
353
367
354
- for _ in tqdm (p .imap (self .calc_tpu , sbet_las_generator ), total = num_las , ascii = True ):
368
+ for _ in tqdm (p .imap (self .calc_tpu , sbet_las_generator ),
369
+ total = num_las , ascii = True ):
355
370
pass
356
371
357
372
return p
0 commit comments