Skip to content

Commit c1f4211

Browse files
committed
Added an optional custom background to egg-postskymaker
1 parent 53fb8cb commit c1f4211

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/egg-postskymaker.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ int main(int argc, char* argv[]) {
6363

6464
// Read command line arguments
6565
std::string config_file;
66+
double background = 0.0;
6667

6768
read_args(argc, argv, arg_list(
68-
name(config_file, "conf")
69+
name(config_file, "conf"), background
6970
));
7071

7172
// Read template SkyMaker configuration file
@@ -100,7 +101,7 @@ int main(int argc, char* argv[]) {
100101
img /= exposure;
101102

102103
// Background subtraction
103-
img -= e10(0.4*(magzp - bgmag))*sqr(aspix);
104+
img += background - e10(0.4*(magzp - bgmag))*sqr(aspix);
104105

105106
// Write back the post-processed image
106107
img_fits.update(img);

0 commit comments

Comments
 (0)