Limb Darkening for CBB Filters

Affiliation
American Association of Variable Star Observers (AAVSO)
Tue, 03/28/2023 - 07:18

Hello.

 

I was going to find the limb darkening for CBB filter, and was pointed to this site: www.cbbldc.com

The site looks promising, but after filling in values and pushing the "Quadratic" button, the site does not yield any result.  

I notice that the website is not secure (Certificat issue?), but wonder if anyone else has this issue? Or do you get limb darkening coefissient for CBB filters in another way? 

I am using Windows 10 and Edge browser , and AstroimageJ for the analyzis.

 

Martin

Affiliation
American Association of Variable Star Observers (AAVSO)
While waiting

Thanks for trying to fix the issue!

 

I have tried to put togheter a short python program that reads the Limb-darkening coefficients for the CBB photometric system file after looking into the documents sorrounding this web-site.

It actually gets u1 and u2 values, but I am not 100% sure that it is correct. So I'll wait and compare until the web-site is godd again.

 

The program works as this: Run it, put in log(g), Teff and FeH values, then it calculates the quadratic lkimb darkening (Found some formulas in the papers). and return the interpolate limb darkening coefficient for CBB filter.

 

Run and output:

C:\Users\mhane\Documents\Astro\python>python limb.py
Enter Log(g): 4.5685800
Enter Teff: 4906
Enter [Fe/H]: -0.0250
Interpolated limb darkening coefficients: u1=0.4793, u2=0.1736
 

 

The program code:

 

import numpy as np

import pandas as pd

from scipy.interpolate import LinearNDInterpolator

import requests

 

# Credit to: Authors: Claret A., Mullen E., Gary B.L.,

# Limb-darkening coefficients for the CBB photometric system

# URL of the file

url = 'https://cfn-live-content-bucket-iop-org.s3.amazonaws.com/journals/2515-5172/6/8/169/revision1/rnaasac8c3ft1_mrt.txt?AWSAccessKeyId=AKIAYDKQL6LTV7YY2HIK&Expires=1680712883&Signature=X4%2FViG7gb0ODYwgYXrxpYjBzPz8%3D'

 

def read_limb_darkening_coefficients(url):

    # Make the request to the URL and get the content

    response = requests.get(url)

 

    # Check if the file opens successfully

    if response.status_code == 200:

        # Split the content by line

        content = response.content.decode().split('\n')

       

        # Extract the data rows, skipping the first 23 rows

        data = []

        for line in content[23:]:

            if line == '':

                break

            row = {

                'Equ': int(line[0:1]),

                'Log_g': float(line[2:6]),

                'Teff': float(line[7:12]),

                'Fe_H': float(line[13:17]),

                'u1': float(line[22:29]),

                'u2': float(line[30:37])

            }

            data.append(row)

                   

        # remove all rows where the equation is power of 2

        df = pd.DataFrame(data)

        df = df[df['Equ'] != 2]

   

        return df

    else:

        print("Error open url")

        exit()


 

def quadratic_limb_darkening(mu, u1, u2):

    return 1 - u1*(1 - mu) - u2*(1 - mu)**2

 

def interpolate_limb_darkening_coefficients(df, log_g, teff, fe_h):

    interpolator = LinearNDInterpolator(df[["Log_g", "Teff", "Fe_H"]].values, df[["u1", "u2"]].values)

    u1, u2 = interpolator(log_g, teff, fe_h)

    return u1, u2

 

log_g = float(input("Enter Log(g): "))

teff = float(input("Enter Teff: "))

fe_h = float(input("Enter [Fe/H]: "))    

 

# Test: Values for Qatar-6:

# log_g = 4.5685800

# teff = 4906

# fe_h = -0.0250

 

df = read_limb_darkening_coefficients(url)

 

u1, u2 = interpolate_limb_darkening_coefficients(df, log_g, teff, fe_h)

print(f"Interpolated limb darkening coefficients: u1={u1:.4f}, u2={u2:.4f}")