Skip to content

Commit c31c287

Browse files
committed
Preserve backward compatibility for 'naive_igm'
1 parent 9189dc5 commit c31c287

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/egg-gencat.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ int vif_main(int argc, char* argv[]) {
6767
// Absorption form intergalactic medium (IGM)
6868
// Valid values: none, constant, madau95, inoue14
6969
std::string igm = "inoue14";
70+
std::string naive_igm; // [deprecated]
7071

7172

7273
// Debug - testing
@@ -136,7 +137,7 @@ int vif_main(int argc, char* argv[]) {
136137
verbose, name(tseed, "seed"), name(tcosmo, "cosmo"),
137138
name(input_cat_file, "input_cat"), selection_band, bands, rfbands, help, list_bands,
138139
clust_r0, clust_r1, clust_lambda, clust_eta, clust_fclust_mlim, clust_fclust_lom,
139-
clust_fclust_him, clust_urnd_mlim, magdis_tdust, igm
140+
clust_fclust_him, clust_urnd_mlim, magdis_tdust, igm, naive_igm
140141
));
141142

142143
if (help) {
@@ -263,6 +264,17 @@ int vif_main(int argc, char* argv[]) {
263264
}
264265
}
265266

267+
if (!naive_igm.empty()) {
268+
warning("the 'naive_igm' option is now deprecated");
269+
warning("please use the 'igm=...' option instead");
270+
271+
if (naive_igm == "1") {
272+
igm = "constant";
273+
} else {
274+
igm = "madau95";
275+
}
276+
}
277+
266278
if (igm != "none" && igm != "constant" && igm != "madau95" && igm != "inoue14") {
267279
error("unknown IGM prescription '", igm, "'");
268280
error("possible values are: 'none', 'constant', 'madau95', or 'inoue14'");

0 commit comments

Comments
 (0)