Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarp failing to run on image mosaicked using swarp #17

Open
shruti-ramaiya opened this issue Dec 19, 2024 · 0 comments
Open

swarp failing to run on image mosaicked using swarp #17

shruti-ramaiya opened this issue Dec 19, 2024 · 0 comments

Comments

@shruti-ramaiya
Copy link

Hi!

I'm using swarp for a two step process:

  1. mosaicking together three image tiles of an astronomical field to form one image
  2. regridding/resampling other images onto the same pixel scale as my mosaicked image

The first step worked perfectly (or so I think anyway!) and produced a mosaic that, upon looking at, seems correct. I used the following parameter file for this:

`# Default configuration file for SWarp 2.41.5

EB 2024-11-28

#----------------------------------- Output -----------------------------------
IMAGEOUT_NAME coadd.fits # Output filename
WEIGHTOUT_NAME coadd.weight.fits # Output weight-map filename

HEADER_ONLY N # Only a header as an output file (Y/N)?
HEADER_SUFFIX .head # Filename extension for additional headers

#------------------------------- Input Weights --------------------------------

WEIGHT_TYPE MAP_WEIGHT # BACKGROUND,MAP_RMS,MAP_VARIANCE
# or MAP_WEIGHT
##WEIGHT_SUFFIX # Suffix to use for weight-maps
WEIGHT_IMAGE /mnt/hoy/VIDEO_FINAL/xmm1_Ks_conf.fits,/mnt/hoy/VIDEO_FINAL/xmm2_Ks_conf.fits,/mnt/hoy/VIDEO_FINAL/xmm3_Ks_conf.fits # Weightmap filename if suffix not used
# (all or for each weight-map)

#------------------------------- Co-addition ----------------------------------

COMBINE Y # Combine resampled images (Y/N)?
COMBINE_TYPE WEIGHTED # MEDIAN,AVERAGE,MIN,MAX,WEIGHTED,CLIPPED
# CHI-OLD,CHI-MODE,CHI-MEAN,SUM,
# WEIGHTED_WEIGHT,MEDIAN_WEIGHT,
# AND,NAND,OR or NOR

#-------------------------------- Astrometry ----------------------------------

CELESTIAL_TYPE NATIVE # NATIVE, PIXEL, EQUATORIAL,
# GALACTIC,ECLIPTIC, or SUPERGALACTIC
PROJECTION_TYPE TAN # Any WCS projection code or NONE
PROJECTION_ERR 0.001 # Maximum projection error (in output
# pixels), or 0 for no approximation
CENTER_TYPE ALL # MANUAL, ALL or MOST
CENTER 00:00:00.0, +00:00:00.0 # Coordinates of the image center
PIXELSCALE_TYPE MEDIAN # MANUAL,FIT,MIN,MAX or MEDIAN
PIXEL_SCALE 0.0 # Pixel scale
IMAGE_SIZE 0 # Image size (0 = AUTOMATIC)

#-------------------------------- Resampling ----------------------------------

RESAMPLE Y # Resample input images (Y/N)?
RESAMPLE_DIR . # Directory path for resampled images
RESAMPLE_SUFFIX .resamp.fits # filename extension for resampled images

RESAMPLING_TYPE LANCZOS3 # NEAREST,BILINEAR,LANCZOS2,LANCZOS3
# LANCZOS4 (1 per axis) or FLAGS
OVERSAMPLING 0 # Oversampling in each dimension
# (0 = automatic)
INTERPOLATE N # Interpolate bad input pixels (Y/N)?
# (all or for each image)

FSCALASTRO_TYPE FIXED # NONE,FIXED, or VARIABLE
FSCALE_KEYWORD FLXSCALE # FITS keyword for the multiplicative
# factor applied to each input image
FSCALE_DEFAULT 1.0 # Default FSCALE value if not in header

GAIN_KEYWORD GAIN # FITS keyword for effect. gain (e-/ADU)
GAIN_DEFAULT 0.0 # Default gain if no FITS keyword found

#--------------------------- Background subtraction ---------------------------

SUBTRACT_BACK N # Subtraction sky background (Y/N)?
# (all or for each image)

BACK_TYPE AUTO # AUTO or MANUAL
# (all or for each image)
BACK_DEFAULT 0.0 # Default background value in MANUAL
# (all or for each image)
BACK_SIZE 128 # Background mesh size (pixels)
# (all or for each image)
BACK_FILTERSIZE 3 # Background map filter range (meshes)
# (all or for each image)

#------------------------------ Memory management -----------------------------

VMEM_DIR . # Directory path for swap files
VMEM_MAX 16384 # Maximum amount of virtual memory (MB)
MEM_MAX 2048 # Maximum amount of usable RAM (MB)
COMBINE_BUFSIZE 2048 # RAM dedicated to co-addition(MB)

#------------------------------ Miscellaneous ---------------------------------

DELETE_TMPFILES Y # Delete temporary resampled FITS files
# (Y/N)?
COPY_KEYWORDS OBJECT # List of FITS keywords to propagate
# from the input to the output headers
WRITE_FILEINFO N # Write information about each input
# file in the output image header?
WRITE_XML Y # Write XML file (Y/N)?
XML_NAME swarp.xml # Filename for XML output
VERBOSE_TYPE NORMAL # QUIET,LOG,NORMAL, or FULL

NTHREADS 0 # Number of simultaneous threads for
# the SMP version of SWarp
# 0 = automatic`

now, when going to regrid other images onto the pixel scale of the mosaicked image that I get from step 1, I get the following error:

Error while reading /mnt/users/ramaiyas/image_swarping/mosaics/vistaKs_results/cdfs_mosaic_vistaKs.fits

it seems only to be an issue when running swarp on mosaicked images but im unsure why this would be - I have checked the header and all seems normal/correct. I was wondering if anyone had any insights into this - any help would be most appreciated!

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant