<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import ukidss

def test_regression_14():
    """
    Regression test for Issue 14:
    https://github.com/astropy/astroquery/issues/14
    """
    u = ukidss.UKIDSSQuery()
    u.get_images_radius(281.9027, -1.9425, 1.0, filter='all', directory='raw', save=True, n_concurrent=8)

def test_ukidss_catalog():
    """
    Copy of doctests for catalog query
    """
    # not necessary to specify database, but done so that changes don't break tests
    R = ukidss.UKIDSSQuery(programmeID='GPS',database='UKIDSSDR7PLUS')
    data = R.get_catalog_gal(10.625,-0.38,radius=0.1)
    bintable = data[0][1]
    assert bintable.size == 5130

def test_ukidss_get_image_gal():
    R = ukidss.UKIDSSQuery()
    fitsfile = R.get_image_gal(10.5,0.0)

    # get UWISH2 data (as per http://astro.kent.ac.uk/uwish2/main.html)
    R.database='U09B8v20120403'
    R.login(username='U09B8',password='<PASSWORD>',community='nonSurvey')
    R.get_image_gal(49.489,-0.27,frametype='leavstack',size=5,filter='H2',save=False)<commit_msg>tests not monkeypatched yet but use new code<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
from ... import ukidss
import astropy.coordinates as coord
import astropy.units as u

def test_regression_14():
    """
    Regression test for Issue 14:
    https://github.com/astropy/astroquery/issues/14
    """

    ukidss.core.Ukidss.get_images(coord.GalacticCoordinates(l=281.9027, b=-1.9425, unit=(u.deg, u.deg)), radius=1 * u.arcmin, waveband='all')

def test_ukidss_catalog():
    """
    Copy of doctests for catalog query
    """
    # not necessary to specify database, but done so that changes don't break tests
    ukidss.core.Ukidss.query_region(coord.GalacticCoordinates(l=10.625,b=-0.38,unit=(u.deg, u.deg)), radius=0.1*u.arcmin)

def test_ukidss_get_image_gal():

    # get UWISH2 data (as per http://astro.kent.ac.uk/uwish2/main.html)

    c = ukidss.core.Ukidss(username='U09B8',password='<PASSWORD>',community='nonSurvey', database='U09B8v20120403')
    c.get_images(coord.GalacticCoordinates(l=49.489, b=-0.27, unit=(u.deg, u.deg)), frame_type='leavstack', image_width=5*u.arcmin, waveband='H2')
{'fraction_non_alphanumeric': 0.14541387024608501, 'fraction_numerical': 0.056375838926174496, 'mean_word_length': 4.273584905660377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1442662', 'n_tokens_mistral': 901, 'n_tokens_neox': 824, 'n_words': 159}