diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a3dafe708..f2772b420 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,16 @@ number of the code change for that issue. These PRs can be viewed at: - Modify the dependencies portion of the project.toml file to specify numpy<2.0 [#1813] +- Reverted #1798 until further testing is done with Photutils. + +- Corrected the way that the number of constituent images are accumulated + per pixel by ensuring each contributing pixel has a finite value and + is not zero. [#1820] + +- Within the HAP configuration files, increased the minimum number of matches + for a successful "rscale" fit from 6 to 10, and removed "shift" as a fit geometry + option. [#1823]. + - Removed the use of a custom smoothing kernel based upon actual image data as a poorly determined kernel can ultimately cause poor source position determination. The default kernel has been set to a @@ -78,8 +88,7 @@ number of the code change for that issue. These PRs can be viewed at: - Improved calculation of S_REGION using dialation and erosion. [#1762] - Skycell added to flt(c) and drz(c) science headers for the pipeline and svm products. [#1729] - -- resolved ``AstropyDeprecationWarning`` s [#1798] + 3.7.0 (02-Apr-2024) =================== diff --git a/JenkinsfileRT b/JenkinsfileRT index 82c214621..1976d11ae 100644 --- a/JenkinsfileRT +++ b/JenkinsfileRT @@ -61,7 +61,7 @@ bc3.env_vars = ['TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory', 'CFLAGS=-std=gnu99'] bc3.name = '3.11' bc3.conda_packages = ['python=3.11'] -bc3.build_cmds = ["pip install numpy astropy ci-watson", +bc3.build_cmds = ["pip install numpy astropy pytest-cov ci-watson", "pip install --upgrade -e '.[test]'", "pip freeze"] bc3.test_cmds = ["pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml --bigdata", diff --git a/doc/source/mast_data_products/hap-parameters.rst b/doc/source/mast_data_products/hap-parameters.rst index 1e833977e..9616323b2 100644 --- a/doc/source/mast_data_products/hap-parameters.rst +++ b/doc/source/mast_data_products/hap-parameters.rst @@ -63,10 +63,10 @@ rnkeyword: str (*default="READNSEA,READNSEB,READNSEC,READNSED"*) Keyword used to specify a value, which is used to override the instrument specific default readnoise values. The value is assumed to be in units of electrons. This parameter should not be populated if the ``rdnoise`` parameter is in use. expkeyword: str (*default="EXPTIME"*) - Keyword used to specify a value, which is used to override the default exposure time image header values. The value is assumed to be in units of seconds. This parameter should not be populated if the ``exptime`` parameter is in use. + Keyword used to specify a value, which is used to override the default exposure time image header values. The value is assumed to be in units of seconds. This parameter should not be populated if the ``exptime`` parameter is in use. gain: str (*default=""*) - Value used to override instrument specific default gain values. The value is assumed to be in units of electrons/count. This parameter should not be populated if the ``gainkeyword`` parameter is in use. + Value used to override instrument specific default gain values. The value is assumed to be in units of electrons/count. This parameter should not be populated if the ``gainkeyword`` parameter is in use. rdnoise: str (*default=""*) Value used to override instrument specific default readnoise values. The value is assumed to be in units of electrons. This parameter should not be populated if the ``rnkeyword`` parameter is in use. @@ -116,8 +116,8 @@ skywidth: float (*default=0.1*) skylower: float (*default=-100.0*) Lower limit of usable data for sky (always in electrons) -sky_bits: int (*default="16"*) - nteger mask bit values considered good pixels in DQ array +sky_bits: str (*default="16"*) + Integer mask bit values considered good pixels in DQ array skyupper: int or null (*default=null*) Upper limit of usable data for sky (always in electrons) @@ -150,20 +150,20 @@ driz_separate : bool (*default=False*) This parameter specifies whether or not to drizzle each input image onto separate output images. The separate output images will all have the same WCS as the final combined output frame. These images are used to create the median image, needed for cosmic ray rejection. driz_sep_bits: int (*default="16"*) - Integer sum of all the DQ bit values from the input image's DQ array that should be considered 'good' when building the weighting mask. This can also be used to reset pixels to good if they had been flagged as cosmic rays during a previous run of ``AstroDrizzle``, by adding the value 4096 for ACS and WFPC2 data. Please see the section on Selecting the ``Bits`` Parameter for a more detailed discussion. + Integer sum of all the DQ bit values from the input image's DQ array that should be considered "good" when building the weighting mask. This can also be used to reset pixels to good if they had been flagged as cosmic rays during a previous run of ``AstroDrizzle``, by adding the value 4096 for ACS and WFPC2 data. Please see the section on Selecting the ``Bits`` Parameter for a more detailed discussion. driz_sep_kernel: str (*default="turbo"*) - Used for the initial separate drizzling operation only, this parameter specifies the form of the kernel function used to distribute flux onto the separate output images. The current options are: 'square', 'point', 'turbo', 'gaussian', and 'lanczos3'. The latter two options ('gaussian' and 'lanczos3') are not guaranteed to conserve flux, but may produce reasonable results; understand the effects of these kernels before using them. A former option 'tophat' has been removed as it was found to produce poor results. See adrizzle.help for more details. + Used for the initial separate drizzling operation only, this parameter specifies the form of the kernel function used to distribute flux onto the separate output images. The current options are: "square", "point", "turbo", "gaussian", and "lanczos3". The latter two options ("gaussian" and "lanczos3") are not guaranteed to conserve flux, but may produce reasonable results; understand the effects of these kernels before using them. A former option "tophat" has been removed as it was found to produce poor results. See adrizzle.help for more details. driz_sep_wt_scl: float (*default=exposure time (from image header)*) - This parameter specifies the weighting factor for input image. If ``driz_sep_wt_scl``\ =\ ``exptime``, then the scaling value will be set equal to the exposure time found in the image header. The use of the default value is recommended for producing optimal behavior for most scenarious. It is possible to set ``wt_scl``\ =\ 'expsq' for weighting by the square of the exposure time, which is optimal for read-noise dominated images. + This parameter specifies the weighting factor for input image. If ``driz_sep_wt_scl``\ =\ ``exptime``, then the scaling value will be set equal to the exposure time found in the image header. The use of the default value is recommended for producing optimal behavior for most scenarious. It is possible to set ``wt_scl``\ =\ "expsq" for weighting by the square of the exposure time, which is optimal for read-noise dominated images. driz_sep_pixfrac: float (*default=1.0*) - Fraction by which input pixels are "shrunk" before being drizzled onto the output image grid, given as a real number between 0 and 1. This specifies the size of the footprint, or "dropsize", of a pixel in units of the input pixel size. If ``pixfrac`` is set to less than 0.001, the kernel parameter will be reset to 'point' for more efficient processing. In the step of drizzling each input image onto a separate output image, the default value of 1.0 is best in order to ensure that each output drizzled image is fully populated with pixels from the input image. For more information, see the help for the ``drizzle`` task. + Fraction by which input pixels are "shrunk" before being drizzled onto the output image grid, given as a real number between 0 and 1. This specifies the size of the footprint, or "dropsize", of a pixel in units of the input pixel size. If ``pixfrac`` is set to less than 0.001, the kernel parameter will be reset to "point" for more efficient processing. In the step of drizzling each input image onto a separate output image, the default value of 1.0 is best in order to ensure that each output drizzled image is fully populated with pixels from the input image. For more information, see the help for the ``drizzle`` task. .. null?!?!?!?!? -driz_sep_fillval: int or INDEF (*default = null*) +driz_sep_fillval: int or INDEF (*default=null*) Value to be assigned to output pixels that have zero weight, or that receive flux from any input pixels during drizzling. This parameter corresponds to the ``fillval`` parameter of the ``drizzle`` task. If the default of ``INDEF`` is used, and if the weight in both the input and output images for a given pixel are zero, then the output pixel will be set to the value it would have had if the input had a non-zero weight. Otherwise, if a numerical value is provided (e.g. 0), then these pixels will be set to that value. driz_sep_compress: bool (*default=False*) @@ -173,28 +173,28 @@ Step 3a: Custom WCS for Separate Outputs """""""""""""""""""""""""""""""""""""""" driz_sep_wcs: bool (*default=False*) - Define custom WCS for seperate output images? + Define custom WCS for separate output images? driz_sep_refimage: str (*default=""*) Reference image from which a WCS solution can be obtained. driz_sep_rot : float or null (*default=null*) - Position Angle of output image's Y-axis relative to North. A value of 0.0 would orient the final output image to be North up. The default of ``INDEF`` specifies that the images will not be rotated, but will instead be drizzled in the default orientation for the camera with the x and y axes of the drizzled image corresponding approximately to the detector axes. This conserves disk space, as these single drizzled images are only used in the intermediate step of creating a median image. + Position Angle of output image's Y-axis relative to North. A value of 0.0 would orient the final output image to be North up. The default of ``INDEF`` specifies that the images will not be rotated, but will instead be drizzled in the default orientation for the camera with the x and y axes of the drizzled image corresponding approximately to the detector axes. This conserves disk space, as these single drizzled images are only used in the intermediate step of creating a median image. driz_sep_scale : float or null (*default=null*) - Linear size of the output pixels in arcseconds/pixel for each separate drizzled image (used in creating the median for cosmic ray rejection). The default value of ``INDEF`` specifies that the undistorted pixel scale for the first input image will be used as the pixel scale for all the output images. + Linear size of the output pixels in arcseconds/pixel for each separate drizzled image (used in creating the median for cosmic ray rejection). The default value of ``INDEF`` specifies that the undistorted pixel scale for the first input image will be used as the pixel scale for all the output images. driz_sep_outnx : int or null (*default=null*) - Size, in pixels, of the X axis in the output images that each input will be drizzled onto. If no value is specified, the smallest size that can accommodate the full dithered field will be used. + Size, in pixels, of the X axis in the output images that each input will be drizzled onto. If no value is specified, the smallest size that can accommodate the full dithered field will be used. driz_sep_outny : int or null (*default=null*) - Size, in pixels, of the Y axis in the output images that each input will be drizzled onto. If no value is specified, the smallest size that can accommodate the full dithered field will be used. + Size, in pixels, of the Y axis in the output images that each input will be drizzled onto. If no value is specified, the smallest size that can accommodate the full dithered field will be used. driz_sep_ra : float or null (*default=null*) - Right ascension (in decimal degrees) specifying the center of the output image. If this value is not designated, the center will automatically be calculated based on the distribution of image dither positions. + Right ascension (in decimal degrees) specifying the center of the output image. If this value is not designated, the center will automatically be calculated based on the distribution of image dither positions. driz_sep_dec : float or null (*default=null*) - Declination (in decimal degrees) specifying the center of the output image. If this value is not designated, the center will automatically be calculated based on the distribution of image dither positions. + Declination (in decimal degrees) specifying the center of the output image. If this value is not designated, the center will automatically be calculated based on the distribution of image dither positions. driz_sep_crpix1: float or null (*default=null*) Reference pixel X position on output (CRPIX1). @@ -340,4 +340,166 @@ final_crpix1: ??? (*default=null*) Reference pixel X position on output (CRPIX1) final_crpix2: ??? (*default=null*) - Reference pixel Y position on output (CRPIX2) \ No newline at end of file + Reference pixel Y position on output (CRPIX2) + + +Alignment +^^^^^^^^^ + +General +""""""" + +MIN_FIT_MATCHES: int (*default=4*) + Minimum number of acceptable cross-matches for a good fit. + +MAX_FIT_RMS: int (*default=20*) + Not currently in use. + +MAX_SOURCES_PER_CHIP: int (*default=250*) + Not currently in use. + + +run_align (*primarily in align.py*) +""""""""""""""""""""""""""""""""""" + +update_hdr_wcs: bool (*default=True*) + Not currently in use. Write newly computed WCS information to image headers? + +catalog_list: list of strings (*default=["GAIAeDR3", "GSC242", "2MASS"]*) + Not currently in use. Set of astrometric catalogs which should be used as references for fitting the input images. A separate fit will be performed for each catalog specified. The catalog name will also be used as part of the output ``WCSNAME`` value for the fit determined from that catalog. + +fit_algorithm_list_ngt1: list of strings (*default=["match_relative_fit", "match_2dhist_fit", "match_default_fit"]*) + Not currently in use. + +fit_algorithm_list_ng1: list of strings (*default=["match_2dhist_fit", "match_default_fit"]*) + Not currently in use. + +MIN_CATALOG_THRESHOLD: int (*default=3*) + Not currently in use. + +MIN_OBSERVABLE_THRESHOLD: int (*default=10*) + Not currently in use. The minimum number of observed sources required to continue fitting. If below this threshold, the code will return a status=1 and try with another catalog. + +MAX_FIT_LIMIT: int (*default=150*) + Not currently in use. + +mosaic_catalog_list: list of strings (*default=["GAIAeDR3", "GSC242", "2MASS"]*) + List of available catalogs for aligning for both pipeline and SVM products. The code will go through each catalog in this order. + +mosaic_fit_list: list of strings (*default=["match_relative_fit", "match_2dhist_fit", "match_default_fit"]*) + List of available fit algorithms for aligning for both pipeline and SVM products; match_default_fit relative alignment without using 2dhist and different throusholds (see json configuration files). + +mosaic_fitgeom_list: dict (*default={"rshift": 10, "rscale": 10, "general": 6}*) + The different fit geometries tried in alignment as well as their minobj value which specifies the number of matched sources required for a successful fit. For pipeline products, the fitgeometry value is ignored and defaults to a fit geometry of ``rscale``. The fitgeom for the pipeline products is specified as a default in *align_utils.perform_fit*. The value for minobj specified here, however, is used for the pipeline products. + +fit quality categories +"""""""""""""""""""""" + + * 1 = valid solution with rms < 10 mas + + * 2 = Valid but compromised solution with rms < 10 mas + + * 3 = Valid solution with RMS >= 10 mas + + * 4 = Valid but compromised solution with RMS >= 10 mas + + * 5 = Not valid solution + + +generate_source_catalogs (*primarily in align_utils.py*) +"""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +box_size: int (*default=13*) + The size of the box used for calculating the 2D Background of the catalog "white light" image along each axis in pixels. In nothing is specified, a default of BKG_BOX_SIZE=27 is used. + +win_size: int (*default=3*) + The size of the 2D filter to apply to the background of the catalog "white light" image. If nothing is specified, a default of BKG_FILTER_SIZE=3 is used. + +nsigma: float (*default=3.0*) + The number of signma used for setting the level of the average background rms. If nothing is specified, a value of 5.0 is used. + +centering_mode: str (*default="starfind"*) + Algorithm to use when computing the positions of the detected sources. Options are "segmentaton" or ``starfind``. Centering will only take place after ``threshold`` has been determined, and sources are identified using segmentation. Centering using ``segmentation`` will rely on ``photutils.segmentation.SourceCatalog`` to generate the properties for the source catalog. Centering using ``starfind`` will use ``photutils.detection.IRAFStarFinder`` to characterize each source in the catalog. + +bkg_estimator: str (*default="MedianBackground"*) + Name of the algorithm to use for background calculation in *photutils.Background2D*. + +rms_estimator: str (*default="StdBackgroundRMS"*) + Name of the rms estimation algorithm used by *photutils.Background2D*. + +num_sources: int (*default=250*) + Not currently in use. Maximum number of brightest/faintest sources to return in catalog. + +deblend: bool (*default=false*) + Specify whether or not to apply photutils deblending algorithm when evaluating each of the identified segments (sources) from the chip. + +fwhmpsf: float (*default=0.13*) + The full width at half maximum of the PSF in arcseconds used for the starfind algorithm. + +classify: bool (*default=false*) + Not currently in use as cosmic rays are being removed before segmentation. Specifies whether or not to apply photutils classification algorithm when evaluating each of the identified segments (sources) from the chip. + +threshold: float (*default=-1.1*) + Value from the image which serves as the limit for determining sources. If None, compute a default value of (background+5*rms(background)). If threshold < 0.0, use absolute value as scaling factor for default value. If nothing is specified a default value of None is used to compute the background. + + + +generate_astrometric_catalog +"""""""""""""""""""""""""""" + +gaia_only: bool (*default=false*) + Not currently in use. Specify whether or not to only use sources from GAIA in output catalog. + +existing_wcs: Class Instance (*default=null*) + Existing WCS object specified by the user + + +perform_fit (*primarily external in tweakwcs.matchutils.XYXYMatch*) +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +For match_relative_fit, match_default_fit, and match_2dhist_fit, the following parameters are used: + +fitgeom": "rscale", + As used above, this is ignored for pipeline products. + +searchrad: float (*default=125*) + The search radius for a match (in units of the tangent plane). + +separation: float (*default=4.0*) + The minimum separation in the tangent plane (in units of the tangent plane) for sources in the image and reference catalogs in order to be considered to be distinct sources. Objects closer together than ``separation`` distance are removed from the image and reference coordinate catalogs prior to matching. + +tolerance: float (*default=2.0*) + The matching tolerance (in units of the tangent plane) after applying an initial solution derived from the ``triangles`` algorithm. + +use2dhist: bool(*default=true*) + Use 2D histogram to find initial offset? + + +determine_fit_quality +""""""""""""""""""""" + +MIN_CATALOG_THRESHOLD": int (*default=3*) + The minimum number of catalog sources required to continue fitting. If below this threshold, the code will return a fit_quality=5 and try with another catalog. + +MIN_OBSERVABLE_THRESHOLD": int (*default=4*) + If the number of observed sources is below this threshold, the code ends alignment and defers to an *a priori* solution. + +MIN_CROSS_MATCHES": int (*default=3*) + Not currently in use. + +MIN_FIT_MATCHES": int (*default=4*) + Not currently in use. + +MAX_FIT_RMS": float (*default=20*) + Not currently in use. Maximum RMS value for a fit to be considered good. Currently a warning is printed but nothing is done with this parameter. + +MAX_FIT_LIMIT": int (*default=150*) + The maximum allowable RMS value for a fit to be considered good. If not, the fit is considered compromised. + +MAX_SOURCES_PER_CHIP: int (*default=250*) + Maximum number of brightest sources per chip which will be used for cross-matching and fitting. + +MAS_TO_ARCSEC: float (*default=1000*) + Conversion factor from milliarcseconds to arcseconds. + +GOOD_FIT_QUALITY_VALUES: int (*default=[1, 2, 3, 4]*) + The fit_quality (see above) flag values that are allowable for a successful fit. \ No newline at end of file diff --git a/drizzlepac/haputils/astrometric_utils.py b/drizzlepac/haputils/astrometric_utils.py index 025a31286..a55f60118 100644 --- a/drizzlepac/haputils/astrometric_utils.py +++ b/drizzlepac/haputils/astrometric_utils.py @@ -61,8 +61,8 @@ from photutils.background import (Background2D, MMMBackground, SExtractorBackground, StdBackgroundRMS) -from photutils.psf import (IntegratedGaussianPRF, SourceGrouper, - IterativePSFPhotometry) +from photutils.psf import (IntegratedGaussianPRF, DAOGroup, + IterativelySubtractedPSFPhotometry) from tweakwcs.correctors import FITSWCSCorrector from stwcs.distortion import utils @@ -847,8 +847,8 @@ def find_fwhm(psf, default_fwhm): """Determine FWHM for auto-kernel PSF This function iteratively fits a Gaussian model to the extracted PSF - using `photutils.psf.IterativePSFPhotometry - `_ + using `photutils.psf.IterativelySubtractedPSFPhotometry + `_ to determine the FWHM of the PSF. Parameters @@ -865,7 +865,7 @@ def find_fwhm(psf, default_fwhm): Value of the computed Gaussian FWHM for the PSF """ - daogroup = SourceGrouper(min_separation=8) + daogroup = DAOGroup(crit_separation=8) mmm_bkg = MMMBackground() iraffind = DAOStarFinder(threshold=2.5 * mmm_bkg(psf), fwhm=default_fwhm) fitter = LevMarLSQFitter() @@ -873,13 +873,13 @@ def find_fwhm(psf, default_fwhm): gaussian_prf = IntegratedGaussianPRF(sigma=sigma_psf) gaussian_prf.sigma.fixed = False try: - itr_phot_obj = IterativePSFPhotometry(finder=iraffind, - group_maker=daogroup, - bkg_estimator=mmm_bkg, - psf_model=gaussian_prf, - fitter=fitter, - fitshape=(11, 11), - niters=2) + itr_phot_obj = IterativelySubtractedPSFPhotometry(finder=iraffind, + group_maker=daogroup, + bkg_estimator=mmm_bkg, + psf_model=gaussian_prf, + fitter=fitter, + fitshape=(11, 11), + niters=2) phot_results = itr_phot_obj(psf) except Exception: log.error("The find_fwhm() failed due to problem with fitting.") diff --git a/drizzlepac/haputils/hla_flag_filter.py b/drizzlepac/haputils/hla_flag_filter.py index ba1797450..211ffb0a2 100755 --- a/drizzlepac/haputils/hla_flag_filter.py +++ b/drizzlepac/haputils/hla_flag_filter.py @@ -1244,7 +1244,9 @@ def hla_nexp_flags(drizzled_image, flt_list, param_dict, plate_scale, catalog_na nexp_array = numpy.zeros((nx, ny), dtype=numpy.int32) for comp_drz_img in component_drz_img_list: - comp_drz_data = (fits.getdata(comp_drz_img) != 0).astype(numpy.int32) + imdata = fits.getdata(comp_drz_img) + comp_drz_data = (numpy.isfinite(imdata) & (imdata != 0)).astype(numpy.int32) + del imdata try: nexp_array += comp_drz_data except ValueError: @@ -1632,7 +1634,8 @@ def make_mask_array(drz_image): mask : numpy.ndarray object mask array """ - mask = fits.open(drz_image)[1].data != 0 + with fits.open(drz_image) as fh: + mask = numpy.isfinite(fh[1].data) & (fh[1].data != 0) dilate = scipy.ndimage.morphology.binary_dilation erode = scipy.ndimage.morphology.binary_erosion kernel1 = numpy.ones((25, 25), dtype=int) diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json index 150243d5a..85f94767f 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json index 7d3d32370..87aee019f 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json index 72e4b80ce..6d5404776 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json index ef40bfa5d..9baa83646 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json index b5a2bf14a..cb146be44 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json index a52c543ac..4c0bd903c 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json @@ -16,7 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"shift": 3, "rshift": 4, "rscale": 6, "general": 6} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/pyproject.toml b/pyproject.toml index e8861313f..a2c9bf1f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "spherical_geometry>=1.2.22", "astroquery>=0.4", "astrocut<=0.9", - "photutils>1.5.0", + "photutils>1.5.0,<1.13.0", "lxml", "PyPDF2", "scikit-image>=0.14.2", diff --git a/tests/hap/test_svm_ibqk07.py b/tests/hap/test_svm_ibqk07.py index b15ad0ac4..8ea350cf6 100644 --- a/tests/hap/test_svm_ibqk07.py +++ b/tests/hap/test_svm_ibqk07.py @@ -29,7 +29,8 @@ """ POLLER_FILE = "wfc3_bqk_07_input.out" -WCS_SUB_NAME = "HSC30" +WCS_IR_SUB_NAME = "HSC30" +WCS_UVIS_SUB_NAME = "FIT_SVM_GAIA" expected_total_point_sources = { "hst_12557_07_wfc3_ir_total_ibqk07_point-cat.ecsv": 2, "hst_12557_07_wfc3_uvis_total_ibqk07_point-cat.ecsv": 13} @@ -183,7 +184,7 @@ def test_svm_wcs_ir(gather_output_data): # Check the WCS solution is as expected wcsname = fits.getval(tdp_files[0], "WCSNAME", ext=1).upper() print("\ntest_svm_wcs_ir. WCSNAME: {} Output file: {}".format(wcsname, tdp_files[0])) - assert WCS_SUB_NAME in wcsname, f"WCSNAME is not as expected for file {tdp_files[0]}." + assert WCS_IR_SUB_NAME in wcsname, f"WCSNAME is not as expected for file {tdp_files[0]}." def test_svm_wcs_ir_all(gather_output_data): @@ -203,7 +204,7 @@ def test_svm_wcs_uvis(gather_output_data): # Check the WCS solution is as expected wcsname = fits.getval(tdp_files[0], "WCSNAME", ext=1).upper() print("\ntest_svm_wcs_uvis. WCSNAME: {} Output file: {}".format(wcsname, tdp_files[0])) - assert WCS_SUB_NAME in wcsname, f"WCSNAME is not as expected for file {tdp_files[0]}." + assert WCS_UVIS_SUB_NAME in wcsname, f"WCSNAME is not as expected for file {tdp_files[0]}." def test_svm_wcs_uvis_all(gather_output_data): diff --git a/tests/hap/test_svm_ibyt50.py b/tests/hap/test_svm_ibyt50.py index 54e9a1e12..ffccac8ec 100644 --- a/tests/hap/test_svm_ibyt50.py +++ b/tests/hap/test_svm_ibyt50.py @@ -30,13 +30,13 @@ POLLER_FILE = "wfc3_byt_50_input.out" WCS_UVIS_SUB_NAME = "FIT_SVM_GAIA" -WCS_IR_SUB_NAME = "FIT_SVM_GSC242" +WCS_IR_SUB_NAME = "FIT_SVM_GAIA" expected_total_point_sources = { -"hst_13023_50_wfc3_ir_total_ibyt50_point-cat.ecsv": 122, -"hst_13023_50_wfc3_uvis_total_ibyt50_point-cat.ecsv": 105} +"hst_13023_50_wfc3_ir_total_ibyt50_point-cat.ecsv": 118, +"hst_13023_50_wfc3_uvis_total_ibyt50_point-cat.ecsv": 100} expected_total_segment_sources = { -"hst_13023_50_wfc3_ir_total_ibyt50_segment-cat.ecsv": 107, -"hst_13023_50_wfc3_uvis_total_ibyt50_segment-cat.ecsv": 415} +"hst_13023_50_wfc3_ir_total_ibyt50_segment-cat.ecsv": 120, +"hst_13023_50_wfc3_uvis_total_ibyt50_segment-cat.ecsv": 300} tolerance = 0.25