Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion SS_readcontrol_330.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3721,6 +3721,7 @@
else
{
N_selparmvec(f) = abs(seltype(f, 4)) + 1; // so reads value for age 0 through this age
if (seltype(f, 1) == 41) N_selparmvec(f) +=2; // for the scaling parameters
}

if (seltype(f, 1) == 41)
Expand Down Expand Up @@ -3856,7 +3857,10 @@
}
else
{
for (j = 1; j <= N_selparmvec(f); j++)

k = 0;
if (seltype(f, 1) == 41) k = 2; // reduce count for the scaling parameters
for (j = 1; j <= N_selparmvec(f) - k; j++)
{
ParCount++;
ParmLabel += "AgeSel_P" + NumLbl(j) + "_" + fleetname(f1) + "(" + NumLbl(f1) + ")";
Expand Down Expand Up @@ -4407,6 +4411,7 @@
echoinput << "create mirror_mask: " << mirror_mask_a(f) << endl;
echoinput << "end check on min-max ranges for age selex=11" << endl;
}
// seltype 41 check on the min-max age range could go here, rather than in selex calcs
parmcount += N_selparmvec(f + Nfleet);
}
// clang-format off
Expand Down
5 changes: 4 additions & 1 deletion SS_selex.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@ FUNCTION void get_selectivity()
{
lastage = abs(seltype(f, 4));
}

for (a = 1; a <= lastage; a++)
{
// with use of -999, lastsel stays constant until changed, so could create a linear change in ln(selex)
Expand All @@ -1138,6 +1137,7 @@ FUNCTION void get_selectivity()
lastsel = sp(a + 1 + scaling_offset);
}
tempvec_a(a) = tempvec_a(a - 1) + lastsel; // cumulative log(selex)
// warning << a << "SP: " << sp(a + 1 + scaling_offset) << " cumul: " << tempvec_a(a) << endl;
}
if (scaling_offset == 0)
{
Expand All @@ -1147,6 +1147,7 @@ FUNCTION void get_selectivity()
{
int low_bin = int(value(sp(1)));
int high_bin = int(value(sp(2)));
// checks and adjustments below should happen in readcontrol
if (low_bin < 0)
{
low_bin = 0;
Expand All @@ -1166,6 +1167,8 @@ FUNCTION void get_selectivity()
sp(1) = low_bin;
sp(2) = high_bin;
temp = mean(tempvec_a(low_bin, high_bin));
// warning << tempvec_a(low_bin, high_bin) << endl;
// warning << low_bin << " " << high_bin << " mean " << temp << endl;
}
sel_a(y, fs, 1) = mfexp(tempvec_a - temp);
a = 0;
Expand Down
Loading