Skip to content

Commit 9151b92

Browse files
committed
Added empirical M/L corretion at low z
1 parent f6b4618 commit 9151b92

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/egg-gencat.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ int phypp_main(int argc, char* argv[]) {
384384
// Flux properties
385385
vec1f rfuv_bulge, rfuv_disk, rfvj_bulge, rfvj_disk;
386386
vec1f sfrir, sfruv, irx;
387-
vec1f lir;
387+
vec1f m2lcor, lir;
388388
vec1u ir_sed;
389389
vec1u opt_sed_bulge;
390390
vec1u opt_sed_disk;
@@ -1259,6 +1259,9 @@ int phypp_main(int argc, char* argv[]) {
12591259
out.rfvj_bulge[idb] = tvj;
12601260
}
12611261

1262+
// Generate redshift-dependent mass-to-light correction
1263+
out.m2lcor = interpolate({-0.15,-0.15,0.0,0.0}, {0.0,0.45,1.3,10.0}, out.z);
1264+
12621265
// Assign optical SED
12631266
// ------------------
12641267

@@ -1517,15 +1520,15 @@ if (!no_flux) {
15171520
vec1f rlam, rsed;
15181521
if (no_ir) {
15191522
// Just the stellar component
1520-
get_opt_sed(m[i], optsed[i], rlam, rsed);
1523+
get_opt_sed(m[i]+out.m2lcor[i], optsed[i], rlam, rsed);
15211524
} else if (no_stellar) {
15221525
// Just the dust component
15231526
get_ir_sed(i, rlam, rsed);
15241527
} else {
15251528
// Both stellar and dust components
15261529
vec1f orlam, orsed;
15271530
vec1f irlam, irsed;
1528-
get_opt_sed(m[i], optsed[i], orlam, orsed);
1531+
get_opt_sed(m[i]+out.m2lcor[i], optsed[i], orlam, orsed);
15291532
get_ir_sed(i, irlam, irsed);
15301533

15311534
// Combine IR SED with optical SED
@@ -1636,7 +1639,7 @@ if (!no_flux) {
16361639

16371640
fits::write_table(out_file, ftable(
16381641
out.id, out.ra, out.dec, out.clustered, out.z, out.d, out.m,
1639-
out.sfr, out.rsb,
1642+
out.sfr, out.rsb, out.m2lcor,
16401643
out.disk_angle, out.disk_radius, out.disk_ratio,
16411644
out.bulge_angle, out.bulge_radius, out.bulge_ratio,
16421645
out.bt, out.m_disk, out.m_bulge, out.passive,

0 commit comments

Comments
 (0)