Dear Frank Valdes,
With fit1d, I would like to fit and subtract the background of images, using during the fit a pixel mask masking both sources within the images and pixel regions at borders (the latter usually set at extreme high or low values in the images).
Apparently, the routine fit1d does not work when using bad pixel masks having bad pixels at the first/last lines or columns.
fit1d (input='test2', output='test3', type="difference", bpm="mnoda-b_an_a_bp2.pl", axis=1, interactive=no, sample="*", naverage=1, function="legendre", order=3, low_reject=2., high_reject=2., niterate=1, grow=0., graphics="stdgraph", cursor="", mode="ql"
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
Singular solution
The output image displays an incorrect subtraction, due to the masked values at the borders interfering with the fit.
Using a mask without such flags at the borders, as mnoda-b_an_a_bp.pl, produces a good result:
fit1d (input='test2', output='test3', type="difference", bpm="mnoda-b_an_a_bp.pl", axis=1, interactive=no, sample="*", naverage=1, function="legendre", order=3, low_reject=2., high_reject=2., niterate=1, grow=0., graphics="stdgraph", cursor="", mode="ql"
I already sent you the files.
Cheers,
Gab