AstrOmatic forum
a problem of scale: FSCALE_DEFAULT - Printable Version

+- AstrOmatic forum (
+-- Forum: AstrOmatic software (/forumdisplay.php?fid=3)
+--- Forum: SWarp (/forumdisplay.php?fid=5)
+--- Thread: a problem of scale: FSCALE_DEFAULT (/showthread.php?tid=315)

a problem of scale: FSCALE_DEFAULT - cjma - 02-15-2008 11:31


I was trying to combine sky flats with swarp, but I found I can't make the scale right. So, I tried to do a simple test by combining a few identical images with FSCALE_DEFAULT set to some values, but I am really confused with the result.

Here is the command I used:

(the default.swarp is generated from swarp -dd)

I found the counts in test.fits are roughly 1.5 of that in a.fits. It is strange that the ratio is not 0.5, and the ratio is not a constant, nither. Though, the distribution is quite narrow (1.40 to 1.53). Since the .head files are the original header of a.fits, there should be no any projection effect, and I have set the FSCALASTRO_TYPE to NONE.
On the other hand, if I set the FSCALE_DEFAULT to 1.0, then the result is exactly the same with a.fits.

May I ask if anyone knows what's going on?


P.S., I am using swarp-2.17.1

RE: a problem of scale: FSCALE_DEFAULT - Chiara Marmo - 02-15-2008 12:41

Hello Cheng-Jiun,
did you try with -WEIGHT_TYPE NONE -WEIGHT_IMAGE ""?
If a weight is introduced the scale varies from pixel to pixel...


RE: a problem of scale: FSCALE_DEFAULT - cjma - 02-16-2008 01:47

Yup, I just tested it with -WEIGHT_TYPE NONE, and the result didn't change. I would be curious if the result did change, too. I mean the weight should not change anything, if the individual images and weights are all exactly the same?

I probably didn't understand the idea of FSCALE right? I thought that the final flux F should be something like F(x,y) = sum((FSCALE_i * f_i(x,y) * w_i(x,y))/sum(w_i(x,y))), if I use -COMBINE_TYPE AVERAGE. Maybe, FSCALE did something else?

Btw, I just read my post again, and I found my poor English might confuse you. I'd like to say I have done the test with -FSCALE_DEFAULT 1.0, and the result goes back to what I expect: the output image is exactly identical to the input image.


RE: a problem of scale: FSCALE_DEFAULT - Emmanuel Bertin - 02-21-2008 20:09

Dear Cheng-Jiun,

yes this is strange indeed. Could you try the same experiment with a single input file?
- Emmanuel.

RE: a problem of scale: FSCALE_DEFAULT - cjma - 02-24-2008 02:42

Hi Emmanuel,

Yup, I have tried single input image. The result is the same with multiple-identical images. In addition, I noticed that if FSCALE is approaching to 1, the ratio between the output image and the input image is also approaching 1/FSCALE, although I thought it should be FSCALE.

Btw, let me take the chance to thank you all for developing swarp, scamp, and all of these convenient tools. They really help me a lot to reduce the data, especially WCS registration.


RE: a problem of scale: FSCALE_DEFAULT - Emmanuel Bertin - 02-28-2008 18:23

OK then I will have a look on my side. I will have more time working on software in the coming weeks.
- Emmanuel.