<commit_before>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.inset_locator import inset_axes

import ephem
import sys
from time import sleep

from astropy.io import fits
from astropy.time import Time
from scipy.io import matlab
from scipy.ndimage.measurements import label
from io import BytesIO
from skimage.io import imread
from skimage.color import rgb2gray
import skimage.filters

from datetime import datetime, timedelta

from pkg_resources import resource_filename
from os.path import join
import requests
import logging

from re import split
from hashlib import sha1
from sqlalchemy import create_engine
from sqlalchemy.exc import OperationalError, InternalError
from IPython import embed


def lin(x,m,b):
    return m*x+b

def transmission(x, a, c):
    '''
    return atmospheric transmission of planar model
    '''
    x = np.pi/2 -x
    return a*np.exp(-c * (1/np.cos(x) - 1))
def transmission2(x, a, c):
    '''
    return atmospheric transmission of planar model with correction (Young - 1974)
    '''
    x = np.pi/2 -x
    return a * np.exp(-c * (1/np.cos(x)*(1-0.0012*(1/np.cos(x)**2 - 1)) - 1))


def transmission3(x, a, c):
    '''
    return atmospheric transmission of spheric model with elevated observer
    This model does not return 1.0 for zenith angle so we subtract airM_0 instead in the end
    '''
    yObs=2.2
    yAtm=9.5
    rEarth=6371.0

    x = (np.pi/2 -x)
    r = rEarth / yAtm
    y = yObs / yAtm

    airMass = np.sqrt( ( r + y )**2 * np.cos(x)**2 + 2.*r*(1.-y) - y**2 + 1.0 ) - (r+y)*np.cos(x)
    airM_0 = np.sqrt( ( r + y )**2 + 2.*r*(1.-y) - y**2 + 1.0 ) - (r+y)
    return a* np.exp(-c * (airMass - airM_0 ))

'''
y1 = sk.transmission(x, 1, 0.57)
y2 = sk.transmission2(x, 1, 0.57)
y4 = sk.transmission3(x, 1, 0.67)

plt.plot(x,y1, label='Planar')
plt.plot(x,y2, label='Planar korrektur')
plt.plot(x,y4, label='geom 2200m')
plt.grid()
plt.ylim((0, 1.1))
plt.legend(loc='lower right')
plt.show()
'''


def downloadImg(url, *args, **kwargs):<commit_msg>removed INFO logging from 'requests' package<commit_after>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.inset_locator import inset_axes

import ephem
import sys
from time import sleep

from astropy.io import fits
from astropy.time import Time
from scipy.io import matlab
from scipy.ndimage.measurements import label
from io import BytesIO
from skimage.io import imread
from skimage.color import rgb2gray
import skimage.filters

from datetime import datetime, timedelta

from pkg_resources import resource_filename
from os.path import join
import requests
import logging

from re import split
from hashlib import sha1
from sqlalchemy import create_engine
from sqlalchemy.exc import OperationalError, InternalError
from IPython import embed


def lin(x,m,b):
    return m*x+b

def transmission(x, a, c):
    '''
    return atmospheric transmission of planar model
    '''
    x = np.pi/2 -x
    return a*np.exp(-c * (1/np.cos(x) - 1))
def transmission2(x, a, c):
    '''
    return atmospheric transmission of planar model with correction (Young - 1974)
    '''
    x = np.pi/2 -x
    return a * np.exp(-c * (1/np.cos(x)*(1-0.0012*(1/np.cos(x)**2 - 1)) - 1))


def transmission3(x, a, c):
    '''
    return atmospheric transmission of spheric model with elevated observer
    This model does not return 1.0 for zenith angle so we subtract airM_0 instead in the end
    '''
    yObs=2.2
    yAtm=9.5
    rEarth=6371.0

    x = (np.pi/2 -x)
    r = rEarth / yAtm
    y = yObs / yAtm

    airMass = np.sqrt( ( r + y )**2 * np.cos(x)**2 + 2.*r*(1.-y) - y**2 + 1.0 ) - (r+y)*np.cos(x)
    airM_0 = np.sqrt( ( r + y )**2 + 2.*r*(1.-y) - y**2 + 1.0 ) - (r+y)
    return a* np.exp(-c * (airMass - airM_0 ))

'''
y1 = sk.transmission(x, 1, 0.57)
y2 = sk.transmission2(x, 1, 0.57)
y4 = sk.transmission3(x, 1, 0.67)

plt.plot(x,y1, label='Planar')
plt.plot(x,y2, label='Planar korrektur')
plt.plot(x,y4, label='geom 2200m')
plt.grid()
plt.ylim((0, 1.1))
plt.legend(loc='lower right')
plt.show()
'''


def downloadImg(url, *args, **kwargs):
    logging.getLogger("requests").setLevel(logging.WARNING)
{'fraction_non_alphanumeric': 0.13439961804726666, 'fraction_numerical': 0.03724039150155168, 'mean_word_length': 3.4385593220338984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '624323', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1542, 'n_words': 469}