<jupyter_start><jupyter_text>Right ascension from HMS to decimal degrees, called hms2dec, and another that converts declination from DMS to decimal degrees, called dms2dec.<jupyter_code>def hms2dec(a,b,c):
    return(15*(a+ b/60 + c/(60*60)))
def dms2dec(a,b,c):
    if a>0:
        return((a+ b/60 + c/(60*60)))
    else:
        return(-(-a+ b/60 + c/(60*60)))
dms2dec(-5,31,12)<jupyter_output><empty_output><jupyter_text>Angular_dist that calculates the angular distance between any two points on the celestial sphere given their right ascension and declination.<jupyter_code>import numpy as np
def angular_dist(ra1,dec1,ra2,dec2):
    ra1 = np.radians(ra1)
    dec1 = np.radians(dec1)
    ra2 = np.radians(ra2)
    dec2 = np.radians(dec2)
    a=(np.sin(0.5*np.abs(dec1-dec2)))**2
    b=np.cos(dec1)*np.cos(dec2)*(np.sin(0.5*np.abs(ra1-ra2)))**2
    c=2*(np.arcsin((a+b)**0.5))
    return(np.degrees(c))
ra1, dec1 = 21.07, 0.1
ra2, dec2 = 21.15, 8.2
angular_dist(ra1, dec1, ra2, dec2)<jupyter_output><empty_output><jupyter_text>Import_bss and import_super functions that import the AT20G BSS and SuperCOSMOS catalogues from the files bss.dat and super.csv<jupyter_code>import numpy as np
def import_bss():
    file=np.loadtxt("bss.dat",usecols=range(1,7))
    return(file)
file[0]
def import_super():
    file1=np.loadtxt("super.csv",delimiter=",",skiprows=1,usecols=[0,1])
    return(file1)
file1<jupyter_output><empty_output><jupyter_text>Crossmatching the BSS and SuperCOSMOS catalogues<jupyter_code>def find_closest(cat, ra, dec):
    min_dist = np.inf
    min_id = None
    for id1, ra1, dec1 in cat:
        dist = angular_dist(ra1, dec1, ra, dec)
        if dist < min_dist:
            min_id = id1
            min_dist = dist
    return min_id, min_dist
bss_cat = import_bss()
super_cat = import_super()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13929539295392954, 'fraction_numerical': 0.051490514905149054, 'mean_word_length': 4.429411764705883, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, '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}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '597586', 'license': 'MIT', 'n_tokens_mistral': 762, 'n_tokens_neox': 739, 'n_words': 152, 'path': 'Astronomy_2.ipynb', 'repo_name': 'Dinesh-Adhithya-H/Data-driven-astronomy', 'size': '1845'}