Skip to content

Commit

Permalink
Mask fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
editeodoro committed Sep 26, 2015
1 parent 70f99b1 commit e6f09db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions src/Arrays/param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,18 @@ bool Param::checkPars() {
good = false;
}
}

if (NORM!="NONE" && NORM!="AZIM" && NORM!="LOCAL") {
std::cout << " ERROR: Unknown type of normalization: " << NORM << std::endl;
std::cout << "Setting to LOCAL" << std::endl;
NORM="LOCAL";
}

if (MASK!="NONE" && MASK!="SMOOTH" && MASK!="SEARCH" && MASK!="THRESHOLD" && MASK!="NEGATIVE") {
std::cout << " ERROR: Unknown type of mask: " << MASK << std::endl;
std::cout << "Setting to SMOOTH" << std::endl;
MASK="SMOOTH";
}

if (flagGalFit) {
if (FREE=="") {
Expand Down Expand Up @@ -652,17 +664,7 @@ bool Param::checkPars() {
checkHome(ivarfile);
}

if (NORM!="NONE" && NORM!="AZIM" && NORM!="LOCAL") {
std::cout << " ERROR: Unknown type of normalization: " << NORM << std::endl;
std::cout << "Setting to LOCAL" << std::endl;
NORM="LOCAL";
}

if (!(MASK=="NONE" || MASK=="SMOOTH" || MASK=="SEARCH" || MASK=="THRESHOLD" || MASK=="NEGATIVE")) {
std::cout << " ERROR: Unknown type of mask: " << MASK << std::endl;
std::cout << "Setting to SMOOTH" << std::endl;
MASK="SMOOTH";
}

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/galfit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ void Galfit<T>::createMask() {
Cube<short> *m = new Cube<short>;
m->saveHead(in->Head());
m->saveParam(in->pars());
m->Head().setMinMax(0.,1.);
m->Head().setMinMax(0.,0);
m->setCube(mask, in->AxisDim());
std::string outname = in->pars().getOutfolder()+"mask.fits";
m->fitswrite_3d(outname.c_str());
Expand Down

0 comments on commit e6f09db

Please sign in to comment.