Skip to content

Commit

Permalink
Re-enable range crop #78 #100
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBodine committed Oct 23, 2023
1 parent 602ee6c commit 1be0831
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
pred_sub = 1 # Automatically predict substrates and save to npz: 0==False; 1==True, SegFormer Model
pltSubClass = True # Export plots of substrate classification and predictions
map_sub = True # Export substrate maps (as rasters). Requires substrate predictions saved to npz.
map_predict = False # Export substrate heat maps (probabilities) for each class. Requires substrate predictions saved to npz.
export_poly = True # Convert substrate maps to shapefile: map_sub must be > 0 or raster maps previously exported
map_class_method = 'max' # 'max' only current option. Take argmax of substrate predictions to get final classification.

Expand Down Expand Up @@ -194,6 +195,7 @@
'projDir':projDir,
'tempC':tempC,
'nchunk':nchunk,
'cropRange':cropRange,
'exportUnknown':exportUnknown,
'fixNoDat':fixNoDat,
'threadCnt':threadCnt,
Expand Down
1 change: 1 addition & 0 deletions main_batchDirectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
'projDir':projDir,
'tempC':tempC,
'nchunk':nchunk,
'cropRange':cropRange,
'exportUnknown':exportUnknown,
'fixNoDat':fixNoDat,
'threadCnt':threadCnt,
Expand Down
5 changes: 3 additions & 2 deletions src/main_readFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,9 @@ def read_master_func(logfilename='',

# Get sonMetaDF
son._loadSonMeta()
son.sonMetaDF['ping_cnt'] = d
son._saveSonMeta(son.sonMetaDF)
# son.sonMetaDF['ping_cnt'] = d
son.sonMetaDF.loc[son.sonMetaDF['ping_cnt'] > d, 'ping_cnt'] = d
son._saveSonMetaCSV(son.sonMetaDF)

# Store flag to export un-rectified sonar tiles in each sonObj.
for son in sonObjs:
Expand Down
3 changes: 2 additions & 1 deletion test_PINGMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
pltSubClass = True # Export plots of substrate classification and predictions
map_sub = 1 # Export substrate maps (as rasters): 0==False; 1==True. Requires substrate predictions saved to npz.
export_poly = True # Convert substrate maps to shapefile: map_sub must be > 0 or raster maps previously exported
map_predict = 0 #Export rectified tiles of the model predictions: 0==False; 1==Probabilities; 2==Logits. Requires substrate predictions saved to npz.
map_predict = False # Export substrate heat maps (probabilities) for each class. Requires substrate predictions saved to npz.
map_class_method = 'max' # 'max' only current option. Take argmax of substrate predictions to get final classification.


Expand Down Expand Up @@ -224,6 +224,7 @@
'projDir':projDir,
'tempC':tempC,
'nchunk':nchunk,
'cropRange':cropRange,
'exportUnknown':exportUnknown,
'fixNoDat':fixNoDat,
'threadCnt':threadCnt,
Expand Down

0 comments on commit 1be0831

Please sign in to comment.