Skip to content

Commit 4c55842

Browse files
committed
Add option to quick compare to compare with area or with another cost function
1 parent f5c0f0b commit 4c55842

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/py_eddy_tracker/appli/eddies.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,16 +451,20 @@ def quick_compare():
451451
)
452452
parser.add_argument("ref", help="Identification file of reference")
453453
parser.add_argument("others", nargs="+", help="Identifications files to compare")
454-
parser.add_argument(
455-
"--area",
456-
action="store_true",
457-
help="Display in percent of area instead percent of observation",
458-
)
454+
help = "Display in percent of area instead percent of observation"
455+
parser.add_argument("--area", action="store_true", help=help)
456+
help = "Use minimal cost function"
457+
parser.add_argument("--minimal_area", action="store_true", help=help)
459458
parser.add_argument("--high", default=40, type=float)
460459
parser.add_argument("--low", default=20, type=float)
461460
parser.add_argument("--invalid", default=5, type=float)
461+
parser.add_argument(
462+
"--path_out", default=None, help="Save each group in separate file"
463+
)
462464
parser.contour_intern_arg()
463465
args = parser.parse_args()
466+
if args.path_out is not None and not exists(args.path_out):
467+
mkdir(args.path_out)
464468

465469
kw = dict(
466470
include_vars=[
@@ -481,7 +485,7 @@ def quick_compare():
481485
gr1, gr2 = get_group(
482486
ref,
483487
other,
484-
*ref.match(other, intern=args.intern),
488+
*ref.match(other, intern=args.intern, minimal_area=args.minimal_area),
485489
invalid=args.invalid,
486490
low=args.low,
487491
high=args.high,

0 commit comments

Comments
 (0)