-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit for the rwhe calibration script #939
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
atom_evaluation/scripts/other_calibrations/rwhe_calib_ali.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import json | ||
|
||
def main(): | ||
|
||
# Parse command line arguments | ||
ap = argparse.ArgumentParser() | ||
ap.add_argument("-json", "--json_file", type=str, required=True, | ||
help="Json file containing input dataset.") | ||
args = vars(ap.parse_args()) | ||
|
||
json_file = args['json_file'] | ||
|
||
# Read dataset file | ||
f = open(json_file, 'r') | ||
dataset = json.load(f) | ||
|
||
# Close dataset file | ||
f.close() | ||
|
||
print(dataset) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kazadhum not to be picky, but we have two function to read the dataset already.
One to use if you want to load the images/pcd:
atom/atom_core/src/atom_core/dataset_io.py
Lines 42 to 160 in a7e0a9c
Other if you do not want to load the images/pcd:
atom/atom_core/src/atom_core/dataset_io.py
Lines 406 to 417 in a7e0a9c
Please use them to keep consistency.
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @manuelgitgomes! I forgot about this. I'll fix it asap. I notice though, that those functions don't close the files after creating the dataset object. Shouldn't they?
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should!
Could you please add it?
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
8c60981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took some time because I was battling with "ModuleNotFound" but it's done. It now uses the
loadResultsJSON()
function.