| git apply --whitespace=nowarn diffs/01-startYear-start_year*.txt
|
| git commit -am 'startYear -> start_year'
|
| git apply --whitespace=nowarn diffs/02-endYear-end_year*.txt
|
| git commit -am 'endYear -> end_year'
|
| git apply --whitespace=nowarn diffs/03-x_angleOfDeclination-x_angle_of_declination*.txt
|
| git commit -am 'x_angleOfDeclination -> x_angle_of_declination'
|
| git apply --whitespace=nowarn diffs/04-y_lengthSegments-y_length_segments*.txt
|
| git commit -am 'y_lengthSegments -> y_length_segments'
|
| git apply --whitespace=nowarn diffs/05-listOfStars-list_of_stars*.txt
|
| git commit -am 'listOfStars -> list_of_stars'
|
| git apply --whitespace=nowarn diffs/06-finalPositionOfStarsDict-final_position_of_stars_dict*.txt
|
| git commit -am 'finalPositionOfStarsDict -> final_position_of_stars_dict'
|
| git apply --whitespace=nowarn diffs/07-startYear_bce_ce-start_year_bce_ce*.txt
|
| git commit -am 'startYear_bce_ce -> start_year_bce_ce'
|
| git apply --whitespace=nowarn diffs/08-endYear_bce_ce-end_year_bce_ce*.txt
|
| git commit -am 'endYear_bce_ce -> end_year_bce_ce'
|
| git apply --whitespace=nowarn diffs/09-isPlotFunction-is_plot_function*.txt
|
| git commit -am 'isPlotFunction -> is_plot_function'
|
| git apply --whitespace=nowarn diffs/10-selectStars-select_stars*.txt
|
| git commit -am 'selectStars -> select_stars'
|
| git apply --whitespace=nowarn diffs/11-starList-star_list*.txt
|
| git commit -am 'starList -> star_list'
|
| git apply --whitespace=nowarn diffs/12-isInverted-is_inverted*.txt
|
| git commit -am 'isInverted -> is_inverted'
|
| diff --git a/generate_examples_star_chart.py b/generate_examples_star_chart.py
|
| index ae78196..5b5d71c 100644
|
| --- a/generate_examples_star_chart.py
|
| +++ b/generate_examples_star_chart.py
|
| @@ -4,7 +4,7 @@
|
| import star_chart_spherical_projection
|
|
|
| if __name__ == '__main__':
|
| - startYear = -15000
|
| + start_year = -15000
|
| endYear = 15000
|
| increment = 5
|
| year_since_example = 25 # 2025
|
| @@ -12,14 +12,14 @@ if __name__ == '__main__':
|
|
|
| star_chart_spherical_projection.position_over_time(star="Vega",
|
| added_star=None,
|
| - start_year_since_2000=startYear,
|
| + start_year_since_2000=start_year,
|
| end_year_since_2000=endYear,
|
| is_precession=True,
|
| increment=increment,
|
| save_to_csv=None)
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| - start_year_since_2000=startYear,
|
| + start_year_since_2000=start_year,
|
| end_year_since_2000=endYear,
|
| is_precession=True,
|
| increment=increment,
|
| @@ -28,7 +28,7 @@ if __name__ == '__main__':
|
| save_plot_name="star_chart_spherical_projection/pytests/examples/plot_star_vega_declination_with_precession.png")
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| - start_year_since_2000=startYear,
|
| + start_year_since_2000=start_year,
|
| end_year_since_2000=endYear,
|
| is_precession=True,
|
| increment=increment,
|
| @@ -37,7 +37,7 @@ if __name__ == '__main__':
|
| save_plot_name="star_chart_spherical_projection/pytests/examples/plot_star_vega_right_ascension_with_precession.png")
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| - start_year_since_2000=startYear,
|
| + start_year_since_2000=start_year,
|
| end_year_since_2000=endYear,
|
| is_precession=False,
|
| increment=increment,
|
| @@ -46,7 +46,7 @@ if __name__ == '__main__':
|
| save_plot_name="star_chart_spherical_projection/pytests/examples/plot_star_vega_declination_without_precession.png")
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| - start_year_since_2000=startYear,
|
| + start_year_since_2000=start_year,
|
| end_year_since_2000=endYear,
|
| is_precession=False,
|
| increment=increment,
|
| diff --git a/generate_examples_star_chart.py b/generate_examples_star_chart.py
|
| index 5b5d71c..b13a898 100644
|
| --- a/generate_examples_star_chart.py
|
| +++ b/generate_examples_star_chart.py
|
| @@ -5,7 +5,7 @@ import star_chart_spherical_projection
|
|
|
| if __name__ == '__main__':
|
| start_year = -15000
|
| - endYear = 15000
|
| + end_year = 15000
|
| increment = 5
|
| year_since_example = 25 # 2025
|
| show_plt = False
|
| @@ -13,14 +13,14 @@ if __name__ == '__main__':
|
| star_chart_spherical_projection.position_over_time(star="Vega",
|
| added_star=None,
|
| start_year_since_2000=start_year,
|
| - end_year_since_2000=endYear,
|
| + end_year_since_2000=end_year,
|
| is_precession=True,
|
| increment=increment,
|
| save_to_csv=None)
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| start_year_since_2000=start_year,
|
| - end_year_since_2000=endYear,
|
| + end_year_since_2000=end_year,
|
| is_precession=True,
|
| increment=increment,
|
| dec_ra="D",
|
| @@ -29,7 +29,7 @@ if __name__ == '__main__':
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| start_year_since_2000=start_year,
|
| - end_year_since_2000=endYear,
|
| + end_year_since_2000=end_year,
|
| is_precession=True,
|
| increment=increment,
|
| dec_ra="R",
|
| @@ -38,7 +38,7 @@ if __name__ == '__main__':
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| start_year_since_2000=start_year,
|
| - end_year_since_2000=endYear,
|
| + end_year_since_2000=end_year,
|
| is_precession=False,
|
| increment=increment,
|
| dec_ra="D",
|
| @@ -47,7 +47,7 @@ if __name__ == '__main__':
|
| star_chart_spherical_projection.plot_position(star="Vega",
|
| added_star=None,
|
| start_year_since_2000=start_year,
|
| - end_year_since_2000=endYear,
|
| + end_year_since_2000=end_year,
|
| is_precession=False,
|
| increment=increment,
|
| dec_ra="R",
|
| diff --git a/star_chart_spherical_projection/declination_r_axis.py b/star_chart_spherical_projection/declination_r_axis.py
|
| index 77fcc69..9bd75fc 100644
|
| --- a/star_chart_spherical_projection/declination_r_axis.py
|
| +++ b/star_chart_spherical_projection/declination_r_axis.py
|
| @@ -28,7 +28,7 @@ def _calculate_radius_of_circle(min_dec, pole):
|
| def _calculate_ruler(declination_min, declination_max, increment, pole):
|
| # define the length of each segment in ruler when radius = 1
|
|
|
| - x_angleOfDeclination = np.arange(-90, 90+1,increment) # declination max range from -90 to 90
|
| + x_angle_of_declination = np.arange(-90, 90+1,increment) # declination max range from -90 to 90
|
| y_lengthSegments = []
|
|
|
| declination_angles_ruler = np.arange(-90, 90+1, increment) # declination max range from -90 to 90
|
| diff --git a/star_chart_spherical_projection/declination_r_axis.py b/star_chart_spherical_projection/declination_r_axis.py
|
| index 9bd75fc..0aac0e9 100644
|
| --- a/star_chart_spherical_projection/declination_r_axis.py
|
| +++ b/star_chart_spherical_projection/declination_r_axis.py
|
| @@ -29,7 +29,7 @@ def _calculate_ruler(declination_min, declination_max, increment, pole):
|
| # define the length of each segment in ruler when radius = 1
|
|
|
| x_angle_of_declination = np.arange(-90, 90+1,increment) # declination max range from -90 to 90
|
| - y_lengthSegments = []
|
| + y_length_segments = []
|
|
|
| declination_angles_ruler = np.arange(-90, 90+1, increment) # declination max range from -90 to 90
|
|
|
| @@ -41,12 +41,12 @@ def _calculate_ruler(declination_min, declination_max, increment, pole):
|
| for n_angle in declination_angles_ruler:
|
| if pole == "North":
|
| ruler_position = _calculate_length(n_angle, radius_of_circle, "North")
|
| - y_lengthSegments.append(ruler_position)
|
| + y_length_segments.append(ruler_position)
|
| if n_angle >= declination_min and n_angle <= declination_max: # North
|
| ruler_position_dict[n_angle] = round(ruler_position, 4)
|
| if pole == "South":
|
| ruler_position = _calculate_length(n_angle, radius_of_circle, "South")
|
| - y_lengthSegments.append(ruler_position)
|
| + y_length_segments.append(ruler_position)
|
| if n_angle <= declination_min and n_angle >= declination_max: # South
|
| ruler_position_dict[n_angle] = round(ruler_position, 4)
|
|
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index 8217d1e..f3a47c9 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -308,11 +308,11 @@ def plot_stereographic_projection(included_stars=[],
|
| figsize_dpi=figsize_dpi,
|
| save_plot_name=save_plot_name)
|
| pole = pole.capitalize()
|
| - listOfStars = []
|
| + list_of_stars = []
|
| if not only_added_stars:
|
| included_stars = [x.title() for x in included_stars] # convert all names to capitalized
|
| for star in _get_stars(included_stars):
|
| - listOfStars.append([star[0],
|
| + list_of_stars.append([star[0],
|
| star[1],
|
| star[2],
|
| star[4],
|
| @@ -325,9 +325,9 @@ def plot_stereographic_projection(included_stars=[],
|
| star_object.pm_speed,
|
| star_object.pm_angle,
|
| star_object.magnitude]
|
| - listOfStars.append(star_row)
|
| + list_of_stars.append(star_row)
|
| else:
|
| - listOfStars = []
|
| + list_of_stars = []
|
| for star_object in added_stars:
|
| star_row = [star_object.star_name,
|
| star_object.ra,
|
| @@ -335,7 +335,7 @@ def plot_stereographic_projection(included_stars=[],
|
| star_object.pm_speed,
|
| star_object.pm_angle,
|
| star_object.magnitude]
|
| - listOfStars.append(star_row)
|
| + list_of_stars.append(star_row)
|
|
|
| # plot star chart as a circular graph
|
|
|
| @@ -389,7 +389,7 @@ def plot_stereographic_projection(included_stars=[],
|
| logger.debug(f"\n{pole}ern Range of Declination: {declination_min} to {declination_max}")
|
|
|
| # convert to x and y values for stars
|
| - x_star_labels, x_ra_values, y_dec_values, star_dict = _generate_stereographic_projection(starList=listOfStars,
|
| + x_star_labels, x_ra_values, y_dec_values, star_dict = _generate_stereographic_projection(starList=list_of_stars,
|
| pole=pole,
|
| year_since_2000=year_since_2000,
|
| is_precession=is_precession,
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index 3edd083..502d0ff 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -40,7 +40,7 @@ def final_position(included_stars=[],
|
| if not only_added_stars:
|
| # show all stars
|
| included_stars = [x.title() for x in included_stars] # convert all names to capitalized
|
| - listOfStars = star_chart_spherical_projection._get_stars(included_stars)
|
| + list_of_stars = star_chart_spherical_projection._get_stars(included_stars)
|
| for star_object in added_stars:
|
| star_row = [star_object.star_name,
|
| star_object.ra,
|
| @@ -48,10 +48,10 @@ def final_position(included_stars=[],
|
| star_object.pm_speed,
|
| star_object.pm_angle,
|
| star_object.magnitude]
|
| - listOfStars.append(star_row)
|
| + list_of_stars.append(star_row)
|
| else:
|
| # show only the user's added stars
|
| - listOfStars = []
|
| + list_of_stars = []
|
| for star_object in added_stars:
|
| star_row = [star_object.star_name,
|
| star_object.ra,
|
| @@ -59,13 +59,13 @@ def final_position(included_stars=[],
|
| star_object.pm_speed,
|
| star_object.pm_angle,
|
| star_object.magnitude]
|
| - listOfStars.append(star_row)
|
| + list_of_stars.append(star_row)
|
|
|
| # Set declination min values when using the _generate_stereographic_projection() to capture all stars if not set
|
| declination_min = -90
|
| declination_max = 90
|
|
|
| - _, _, _, finalPositionOfStarsDict = star_chart_spherical_projection._generate_stereographic_projection(starList=listOfStars,
|
| + _, _, _, finalPositionOfStarsDict = star_chart_spherical_projection._generate_stereographic_projection(starList=list_of_stars,
|
| pole="North",
|
| declination_min=declination_min,
|
| year_since_2000=year_since_2000,
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index f3a47c9..c2195b9 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -201,7 +201,7 @@ def _generate_stereographic_projection(starList=None,
|
| # Convert Star chart from RA hours to Radians to chart
|
| list_of_stars = _ra_to_radians(starList)
|
|
|
| - finalPositionOfStarsDict = {} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| + final_position_of_stars_dict = {} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| x_star_labels = []
|
| x_ra_values = []
|
| y_dec_values = []
|
| @@ -246,7 +246,7 @@ def _generate_stereographic_projection(starList=None,
|
| in_range_value = True # South
|
|
|
| if in_range_value:
|
| - finalPositionOfStarsDict[name] = {"Declination" : star_declination, "RA": _radians_to_ra(star_ra)} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| + final_position_of_stars_dict[name] = {"Declination" : star_declination, "RA": _radians_to_ra(star_ra)} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| x_star_labels.append(name)
|
| x_ra_values.append(star_ra)
|
| y_dec_values.append(dec_ruler_position)
|
| @@ -262,13 +262,13 @@ def _generate_stereographic_projection(starList=None,
|
| in_range_value = True # South
|
|
|
| if in_range_value:
|
| - finalPositionOfStarsDict[name] = {"Declination" : float(star_declination), "RA": _radians_to_ra(star_ra)} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| + final_position_of_stars_dict[name] = {"Declination" : float(star_declination), "RA": _radians_to_ra(star_ra)} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| x_star_labels.append(name)
|
| x_ra_values.append(star_ra)
|
| y_dec_values.append(dec_ruler_position)
|
| logger.debug(f"Original: '{name}': {np.rad2deg(ra)} RA (degrees) and {dec} Declination (degrees)")
|
|
|
| - return x_star_labels, x_ra_values, y_dec_values, finalPositionOfStarsDict
|
| + return x_star_labels, x_ra_values, y_dec_values, final_position_of_stars_dict
|
|
|
| def plot_stereographic_projection(included_stars=[],
|
| pole=None,
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index 502d0ff..6b78f57 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -65,7 +65,7 @@ def final_position(included_stars=[],
|
| declination_min = -90
|
| declination_max = 90
|
|
|
| - _, _, _, finalPositionOfStarsDict = star_chart_spherical_projection._generate_stereographic_projection(starList=list_of_stars,
|
| + _, _, _, final_position_of_stars_dict = star_chart_spherical_projection._generate_stereographic_projection(starList=list_of_stars,
|
| pole="North",
|
| declination_min=declination_min,
|
| year_since_2000=year_since_2000,
|
| @@ -76,13 +76,13 @@ def final_position(included_stars=[],
|
| if save_to_csv is not None:
|
| header_options = ["Common Name", "Right Ascension (HH.MM.SS)", "Declination (DD.SS)"]
|
| star_chart_list = []
|
| - for star_name, star_position in finalPositionOfStarsDict.items():
|
| + for star_name, star_position in final_position_of_stars_dict.items():
|
| star_chart_list.append([star_name, star_position["RA"], star_position["Declination"]])
|
| df = pd.DataFrame(star_chart_list, columns=header_options)
|
| df = df.sort_values(by=["Common Name"])
|
| df.to_csv(save_to_csv, header=header_options, index=False)
|
|
|
| - return finalPositionOfStarsDict
|
| + return final_position_of_stars_dict
|
|
|
| def position_over_time(star=None,
|
| added_star=None,
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index 6b78f57..b9f6358 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -197,12 +197,12 @@ def plot_position(star=None,
|
| while y_increment > 20:
|
| y_increment = 20
|
|
|
| - if year_lst[0] >= -2000: startYear_bce_ce = f"{year_lst[0]} C.E" # positive years for C.E
|
| - if year_lst[0] < -2000: startYear_bce_ce = f"{abs(year_lst[0])} B.C.E" # negative years for B.C.E
|
| + if year_lst[0] >= -2000: start_year_bce_ce = f"{year_lst[0]} C.E" # positive years for C.E
|
| + if year_lst[0] < -2000: start_year_bce_ce = f"{abs(year_lst[0])} B.C.E" # negative years for B.C.E
|
| if year_lst[-1] >= -2000: endYear_bce_ce = f"{year_lst[-1]} C.E" # positive years for C.E
|
| if year_lst[-1] < -2000: endYear_bce_ce = f"{abs(year_lst[-1])} B.C.E" # negative years for B.C.E
|
|
|
| - plt.title(f"{star_name}'s {title} {precession_label} from {startYear_bce_ce} to {endYear_bce_ce}, Every {increment} Years")
|
| + plt.title(f"{star_name}'s {title} {precession_label} from {start_year_bce_ce} to {endYear_bce_ce}, Every {increment} Years")
|
| plt.plot(year_lst, plot_y)
|
| plt.xlabel("Year")
|
| plt.ylabel(y_label)
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index b9f6358..460f5fa 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -199,10 +199,10 @@ def plot_position(star=None,
|
|
|
| if year_lst[0] >= -2000: start_year_bce_ce = f"{year_lst[0]} C.E" # positive years for C.E
|
| if year_lst[0] < -2000: start_year_bce_ce = f"{abs(year_lst[0])} B.C.E" # negative years for B.C.E
|
| - if year_lst[-1] >= -2000: endYear_bce_ce = f"{year_lst[-1]} C.E" # positive years for C.E
|
| - if year_lst[-1] < -2000: endYear_bce_ce = f"{abs(year_lst[-1])} B.C.E" # negative years for B.C.E
|
| + if year_lst[-1] >= -2000: end_year_bce_ce = f"{year_lst[-1]} C.E" # positive years for C.E
|
| + if year_lst[-1] < -2000: end_year_bce_ce = f"{abs(year_lst[-1])} B.C.E" # negative years for B.C.E
|
|
|
| - plt.title(f"{star_name}'s {title} {precession_label} from {start_year_bce_ce} to {endYear_bce_ce}, Every {increment} Years")
|
| + plt.title(f"{star_name}'s {title} {precession_label} from {start_year_bce_ce} to {end_year_bce_ce}, Every {increment} Years")
|
| plt.plot(year_lst, plot_y)
|
| plt.xlabel("Year")
|
| plt.ylabel(y_label)
|
| diff --git a/star_chart_spherical_projection/error_handling.py b/star_chart_spherical_projection/error_handling.py
|
| index 0f4d79d..494bcad 100644
|
| --- a/star_chart_spherical_projection/error_handling.py
|
| +++ b/star_chart_spherical_projection/error_handling.py
|
| @@ -8,7 +8,7 @@ import pandas as pd
|
|
|
| import star_chart_spherical_projection
|
|
|
| -def errorHandling(isPlotFunction=None,
|
| +def errorHandling(is_plot_function=None,
|
| included_stars=None,
|
| pole=None,
|
| year_since_2000=None,
|
| @@ -69,7 +69,7 @@ def errorHandling(isPlotFunction=None,
|
| raise ValueError(f"[only_added_stars]: Must be a bool, current type = '{type(only_added_stars)}'")
|
|
|
| # Error Handling for final_position() function
|
| - if not isPlotFunction:
|
| + if not is_plot_function:
|
| # Ensure that declination ranges are set and within within ranges
|
| if declination_max is not None:
|
| if type(declination_max) != int and type(declination_max) != float:
|
| @@ -83,7 +83,7 @@ def errorHandling(isPlotFunction=None,
|
| raise ValueError(f"[save_to_csv]: Extension must be a .csv file, current extension = '{save_to_csv.split('.')[1]}'")
|
|
|
| # Error Handling for plot_stereographic_projection() function
|
| - if isPlotFunction:
|
| + if is_plot_function:
|
| # Ensure that Pole selected are within options
|
| if type(pole) != str:
|
| raise ValueError(f"[pole]: Must be a str, current type = '{type(pole)}'")
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index c2195b9..9b7d122 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -289,7 +289,7 @@ def plot_stereographic_projection(included_stars=[],
|
| save_plot_name=None):
|
|
|
| # Catch errors in given arguments before plotting and set default constants
|
| - star_chart_spherical_projection.errorHandling(isPlotFunction=True,
|
| + star_chart_spherical_projection.errorHandling(is_plot_function=True,
|
| included_stars=included_stars,
|
| pole=pole,
|
| declination_min=declination_min,
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index 460f5fa..b73ee46 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -27,7 +27,7 @@ def final_position(included_stars=[],
|
| save_to_csv=None):
|
| # return the final position of the stars as a dictionary
|
|
|
| - star_chart_spherical_projection.errorHandling(isPlotFunction=False,
|
| + star_chart_spherical_projection.errorHandling(is_plot_function=False,
|
| included_stars=included_stars,
|
| year_since_2000=year_since_2000,
|
| is_precession=is_precession,
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index 9b7d122..38131c5 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -28,15 +28,15 @@ southern_declination_max = -90
|
| # Start Year (JP2000)
|
| j2000 = 2000 # start year of the star catalogue (jan 1 2000 via IAU)
|
|
|
| -def _get_stars(selectStars=[]):
|
| +def _get_stars(select_stars=[]):
|
| # selectStars only returns a subset of all the stars saved, empty will return all in the star_data.csv file
|
| # stars: ["name", "RA: HH.MM.SS", Declination DD.SS, Proper Motion Speed (mas/yr), Proper Motion Angle (DD.SS), Magnitude (V, Visual)]
|
| star_data_list = []
|
| star_csv_file = os.path.join(os.path.dirname(__file__), 'data', 'stars_with_data.csv') # get file's directory, up one level, /data/4_all_stars_data.csv
|
| star_dataframe = pd.read_csv(star_csv_file)
|
| for index, row in star_dataframe.iterrows():
|
| - if len(selectStars) > 0: # get only a subset of all stars
|
| - if row["Common Name"] in selectStars:
|
| + if len(select_stars) > 0: # get only a subset of all stars
|
| + if row["Common Name"] in select_stars:
|
| star_data_list.append(row.tolist())
|
| else:
|
| star_data_list.append(row.tolist())
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index 38131c5..b7a96c2 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -189,7 +189,7 @@ def _precession_vondrak(star_name, star_ra, star_dec, year_YYYY_since_2000):
|
| logger.debug(f"Precession for Star = {star_name}, Declination = {vondrak_dec}, RA = {vondrak_ra}")
|
| return vondrak_dec, vondrak_ra
|
|
|
| -def _generate_stereographic_projection(starList=None,
|
| +def _generate_stereographic_projection(star_list=None,
|
| pole=None,
|
| year_since_2000=None,
|
| is_precession=None,
|
| @@ -199,7 +199,7 @@ def _generate_stereographic_projection(starList=None,
|
| # Generate sterographic projections and return declination and right ascension
|
|
|
| # Convert Star chart from RA hours to Radians to chart
|
| - list_of_stars = _ra_to_radians(starList)
|
| + list_of_stars = _ra_to_radians(star_list)
|
|
|
| final_position_of_stars_dict = {} # {'Common Name': {"Declination" : Declination (int), "RA": RA (str)}
|
| x_star_labels = []
|
| @@ -389,7 +389,7 @@ def plot_stereographic_projection(included_stars=[],
|
| logger.debug(f"\n{pole}ern Range of Declination: {declination_min} to {declination_max}")
|
|
|
| # convert to x and y values for stars
|
| - x_star_labels, x_ra_values, y_dec_values, star_dict = _generate_stereographic_projection(starList=list_of_stars,
|
| + x_star_labels, x_ra_values, y_dec_values, star_dict = _generate_stereographic_projection(star_list=list_of_stars,
|
| pole=pole,
|
| year_since_2000=year_since_2000,
|
| is_precession=is_precession,
|
| diff --git a/star_chart_spherical_projection/position_of_stars.py b/star_chart_spherical_projection/position_of_stars.py
|
| index b73ee46..c7e6146 100644
|
| --- a/star_chart_spherical_projection/position_of_stars.py
|
| +++ b/star_chart_spherical_projection/position_of_stars.py
|
| @@ -65,7 +65,7 @@ def final_position(included_stars=[],
|
| declination_min = -90
|
| declination_max = 90
|
|
|
| - _, _, _, final_position_of_stars_dict = star_chart_spherical_projection._generate_stereographic_projection(starList=list_of_stars,
|
| + _, _, _, final_position_of_stars_dict = star_chart_spherical_projection._generate_stereographic_projection(star_list=list_of_stars,
|
| pole="North",
|
| declination_min=declination_min,
|
| year_since_2000=year_since_2000,
|
| @@ -109,7 +109,7 @@ def position_over_time(star=None,
|
| position_over_time = {}
|
| for year in years_to_calculate:
|
| star_row = [[star_name, star_ra, star_declination, star_pm_speed, star_pm_angle, star_mag]]
|
| - _, star_radians, _, star_dict = star_chart_spherical_projection._generate_stereographic_projection(starList=star_row,
|
| + _, star_radians, _, star_dict = star_chart_spherical_projection._generate_stereographic_projection(star_list=star_row,
|
| year_since_2000=year,
|
| is_precession=is_precession,
|
| pole="North",
|
| diff --git a/star_chart_spherical_projection/generate_star_chart.py b/star_chart_spherical_projection/generate_star_chart.py
|
| index b7a96c2..4726a10 100644
|
| --- a/star_chart_spherical_projection/generate_star_chart.py
|
| +++ b/star_chart_spherical_projection/generate_star_chart.py
|
| @@ -362,7 +362,7 @@ def plot_stereographic_projection(included_stars=[],
|
| pole)
|
|
|
| # Display declination lines on the chart from -min to +max
|
| - def displayDeclinationMarksOnAxis(declination_values, dec_min, dec_max, isInverted):
|
| + def displayDeclinationMarksOnAxis(declination_values, dec_min, dec_max, is_inverted):
|
| # set declination marks based on the ruler to space out lines
|
| ruler_declination_position = list(ruler_position_dict.values())
|
| ruler_declination_labels = list(ruler_position_dict.keys())
|