Skip to content

Commit 22158f5

Browse files
committed
In network keep always untracked data under group "0"
1 parent a458867 commit 22158f5

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/py_eddy_tracker/appli/network.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,11 @@ def build_network():
4848
action="store_true",
4949
help="Use intern contour instead of outter contour",
5050
)
51-
parser.add_argument(
52-
"--keep_untracked",
53-
action="store_true",
54-
help=f"Store untracked observation with group number {Network.NOGROUP}",
55-
)
5651
args = parser.parse_args()
5752

5853
n = Network(args.identification_regex, window=args.window, intern=args.intern)
5954
group = n.group_observations(minimal_area=True)
60-
n.build_dataset(group, args.keep_untracked).write_file(filename=args.out)
55+
n.build_dataset(group).write_file(filename=args.out)
6156

6257

6358
def divide_network():

src/py_eddy_tracker/observations/network.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def group_observations(self, **kwargs):
118118
)
119119
return gr
120120

121-
def build_dataset(self, group, keep_untracked=True):
121+
def build_dataset(self, group):
122122
nb_obs = group.shape[0]
123123
model = EddiesObservations.load_file(self.filenames[-1], raw_data=True)
124124
eddies = TrackEddiesObservations.new_like(model, nb_obs)
@@ -140,6 +140,8 @@ def build_dataset(self, group, keep_untracked=True):
140140
i = stop
141141
if display_iteration:
142142
print()
143+
eddies = eddies.add_fields(('track',))
144+
eddies.obs['track'][new_i] = group
143145
return eddies
144146

145147

0 commit comments

Comments
 (0)