Skip to content

Commit b2d13eb

Browse files
committed
Updated to latest phy++ API
1 parent 1c74a9e commit b2d13eb

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/egg-2skymaker.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int phypp_main(int argc, char* argv[]) {
176176

177177
if (count(sky_param == "WAVELENGTH") == 0) {
178178
sky_param.push_back("WAVELENGTH");
179-
sky_value.push_back(strn(cat.lambda[b]));
179+
sky_value.push_back(to_string(cat.lambda[b]));
180180

181181
}
182182

@@ -312,7 +312,7 @@ int phypp_main(int argc, char* argv[]) {
312312
tpar.push_back("IMAGE_NAME");
313313
tval.push_back(img_dir+img_name+"-sci.fits");
314314
tpar.push_back("IMAGE_SIZE");
315-
tval.push_back(strn(sx)+","+strn(sy));
315+
tval.push_back(to_string(sx)+","+to_string(sy));
316316
tpar.push_back("IMAGE_HEADER");
317317
tval.push_back(hdr_file);
318318

@@ -404,8 +404,8 @@ int phypp_main(int argc, char* argv[]) {
404404
tx[idi[idis]] = ttx[idis]; ty[idi[idis]] = tty[idis];
405405

406406
// Write the catalog for this section
407-
std::string six = align_right(strn(ix+1), strn(nsx).size(), '0');
408-
std::string siy = align_right(strn(iy+1), strn(nsy).size(), '0');
407+
std::string six = align_right(to_string(ix+1), to_string(nsx).size(), '0');
408+
std::string siy = align_right(to_string(iy+1), to_string(nsy).size(), '0');
409409

410410
auto spl = file::split_extension(out_file);
411411
write_catalog(spl.first+"-"+six+"-"+siy+spl.second, idi, nx, ny);

src/egg-gencat.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ int phypp_main(int argc, char* argv[]) {
181181
});
182182

183183
// Print
184-
vec1s srlam = strna(rlam)+" um, ";
185-
vec1s swidth = strna(width);
184+
vec1s srlam = to_string_vector(rlam)+" um, ";
185+
vec1s swidth = to_string_vector(width);
186186
vec1s item = " - "+align_left(fils, max(length(fils)))+
187187
" ref-lam = "+align_left(srlam, max(length(srlam)))+
188188
"FWHM = "+swidth+" um";
@@ -1643,7 +1643,7 @@ if (!no_flux) {
16431643

16441644
if (save_sed) {
16451645
if (verbose) {
1646-
note("writing "+strn(nsed)+" SEDs to disk...");
1646+
note("writing ", nsed, " SEDs to disk...");
16471647

16481648
auto pg = progress_start(nsed);
16491649
do {

src/egg-getsed.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int phypp_main(int argc, char* argv[]) {
2020
cmp_str = component+"-";
2121
}
2222

23-
out = file::remove_extension(seds)+"-"+cmp_str+strn(id)+(ascii ? ".cat" : ".fits");
23+
out = file::remove_extension(seds)+"-"+cmp_str+to_string(id)+(ascii ? ".cat" : ".fits");
2424
} else {
2525
file::mkdir(file::get_directory(out));
2626
}
@@ -78,7 +78,7 @@ int phypp_main(int argc, char* argv[]) {
7878

7979
std::ifstream file(seds);
8080

81-
// Read bulge
81+
// Read bulge
8282
uint_t start = tstart_bulge[id];
8383
uint_t nbyte = tnbyte_bulge[id]/2;
8484
uint_t npt = nbyte/sizeof(float);
@@ -103,7 +103,8 @@ int phypp_main(int argc, char* argv[]) {
103103
}
104104

105105
if (ascii) {
106-
ascii::write_table_hdr(out, 18, ftable(lambda, strna_sci(flux)));
106+
ascii::write_table_hdr(out, 18, {"lambda[um]", "flux[uJy]"},
107+
lambda, format::scientific(flux));
107108
} else {
108109
fits::write_table(out, ftable(lambda, flux));
109110
}
@@ -128,7 +129,7 @@ void print_help() {
128129
}
129130
};
130131

131-
print("egg-getsed v1.0rc1");
132+
print("egg-getsed v1.0");
132133
print("usage: egg-getsed [options]\n");
133134

134135
print("List of options:");

0 commit comments

Comments
 (0)