Skip to content

Commit

Permalink
edit for mispellings, rename error_testing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Mar 19, 2024
1 parent d44f28c commit 338b604
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pip install pydar

## Quickstart: PYDAR

Cassini-Huygens was an [orbiter around Saturn and its moons](https://science.nasa.gov/mission/cassini/), originally lauched in 1997. Cassini ran successfully for years before it was purposefully burned up in Saturn's upper atmosphere to avoid potential contamination of Saturn's moons . As the orbiter passed over Titan in dozens of flybys gigabits of data were recorded and sent back
Cassini-Huygens was an [orbiter around Saturn and its moons](https://science.nasa.gov/mission/cassini/), originally launched in 1997. Cassini ran successfully for years before it was purposefully burned up in Saturn's upper atmosphere to avoid potential contamination of Saturn's moons . As the orbiter passed over Titan in dozens of flybys gigabits of data were recorded and sent back

All Cassini data for Titan is organized and retrieved based on [flyby observation numbers or ID numbers](https://solarsystem.nasa.gov/missions/cassini/mission/tour/flybys/?page=0&per_page=40&order=publish_date+desc%2Ccreated_at+desc&search=&tags=cassini%3Aflybys). Pydar makes it easy to find and view relevant flybys based on a time range, latitude/longitude position, or a feature name

Expand Down Expand Up @@ -694,7 +694,7 @@ Feature Names collected from [Gazetteer of Planetary Nomenclature](https://plane

Instrument information and naming conventions collected from the [Cassini Radar User Guide](https://pds-imaging.jpl.nasa.gov/documentation/Cassini_RADAR_Users_Guide_2nd_Ed_191004_cmp_200421.pdf)

This material is based upon work supported by the National Science Foundation Graduate Fellowship under Grant No. 2141064. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not neccessarily reflect the views of the National Science Foundation.
This material is based upon work supported by the National Science Foundation Graduate Fellowship under Grant No. 2141064. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

## Acknowledging Software
Please acknowledge the use of this software in any publications by citing:
Expand Down
2 changes: 1 addition & 1 deletion pydar/error_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def errorHandlingRetrieveIDSByTime(year=None, doy=None, hour=None, minute=None,
if type(millisecond) != int:
raise ValueError(f"[millisecond]: Must be an int, current type = '{type(millisecond)}'")
if millisecond < 0 or millisecond > 999:
raise ValueError("[millisecond]: second must be a postive value from 0 to 999")
raise ValueError("[millisecond]: second must be a positive value from 0 to 999")

def errorHandlingRetrieveIDSByTimeRange(start_year=None,
start_doy=None,
Expand Down
2 changes: 1 addition & 1 deletion pydar/extract_flyby_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def downloadBIDRCORADRData(cordar_file_name, segment_id, resolution_px):
if 'ZIP' in (txt.split('/')[0]).split(".")[1]:
filename += '.ZIP'
all_bidr_files.append(filename)
if segment_id in filename: # only save certain segements
if segment_id in filename: # only save certain segments
for resolution in resolution_px: # only save top x resolutions
bi_types = ["B", "E", "T", "N", "M", "L"] # BI<OPTION>Q<RESOLUTION>
for bi in bi_types:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def test_retrieveIDSByTime_secondInvalidRange(second_invalid_range):

@pytest.mark.parametrize("millisecond_invalid_range", [(-1), (1000)])
def test_retrieveIDSByTime_milliscondInvalidRange(millisecond_invalid_range):
with pytest.raises(ValueError, match=re.escape("[millisecond]: second must be a postive value from 0 to 999")):
with pytest.raises(ValueError, match=re.escape("[millisecond]: second must be a positive value from 0 to 999")):
pydar.retrieveIDSByTime(year=2005, doy=301, hour=3, minute=15, second=20, millisecond=millisecond_invalid_range)

@pytest.mark.parametrize("invalid_input, error_output", invalid_non_int_options)
Expand Down
8 changes: 4 additions & 4 deletions pydar/read_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def readAAREADME(coradr_results_directory=None, section_to_print=None, print_to_

sectionList = determineSectionToPrint(section_to_print, "AAREADME")
if sectionList is None:
section_to_print = section_to_print.upper() # check if the section is case-senstive
section_to_print = section_to_print.upper() # check if the section is case-sensitive
sectionList = determineSectionToPrint(section_to_print, "AAREADME")
if sectionList is None:
section_to_print = section_to_print.title() # check if the section is case-senstive
section_to_print = section_to_print.title() # check if the section is case-sensitive
sectionList = determineSectionToPrint(section_to_print, "AAREADME")
if sectionList is None:
raise ValueError(f"[readAAREADME]: Cannot find a revelant section_to_print: Invalid '{section_to_print}'")
Expand Down Expand Up @@ -217,7 +217,7 @@ def readLBLREADME(coradr_results_directory=None, section_to_print=None, print_to
if section_to_print == "FILE_NAME" or section_to_print == "RECORD_TYPE":
# Same text used to reference both FILE_NAME and RECORD_TYPE, user needs to specify if UNCOMPRESSED or COMPRESSED file
raise ValueError(f"Specify {section_to_print} as either '{section_to_print} UNCOMPRESSED' or '{section_to_print} COMPRESSED'")
# Catch common mispelling: not including the ^ at the front of a line name
# Catch common misspelling: not including the ^ at the front of a line name
if section_to_print == "DESCRIPTION" or section_to_print == "IMAGE" or section_to_print == "DATA_SET_MAP_PROJECTION":
section_to_print = f"^{section_to_print}" # sets the user's option to include the easy to miss ^

Expand All @@ -227,7 +227,7 @@ def readLBLREADME(coradr_results_directory=None, section_to_print=None, print_to

sectionList = determineSectionToPrint(section_to_print, "LBL")
if sectionList is None:
# check if the section is case-senstive
# check if the section is case-sensitive
section_to_print = section_to_print.upper()
sectionList = determineSectionToPrint(section_to_print, "LBL")
if sectionList is None:
Expand Down
2 changes: 1 addition & 1 deletion pydar/sbdr_make_shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def sbdrMakeShapeFile(filename=None,
ind = ind[~ind.SAR_RANGE_RES.isin([0])]
ind = ind[~ind.SAR_AZIMUTH_RES.isin([0])]

if len(ind.index) == 0: # No data satifies all conditions
if len(ind.index) == 0: # No data satisfies all conditions
ind = info[~info.ACT_AZIMUTH_ANGLE.isin([0])]
ind = ind[~ind.ACT_ELLIPSE_PT1_LAT.isin([0])]
logger.info("ERROR: No Active SAR Model")
Expand Down
2 changes: 1 addition & 1 deletion pydar/updateCsvCORADARJPLOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def updateCsvCORADRJPLOptions():
if coradr_id[0].split("_")[1] in flyby_radar_take_num:
coradr_id[1] = True # Is a Titan Flyby

# Wrte to CSV
# Write to CSV
header_options = ["CORADR ID",
"Is a Titan Flyby",
"Contains ABDR",
Expand Down
2 changes: 1 addition & 1 deletion pydar/updateCsvFeatureNameDetails.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def updateCsvFeatureNameDetails():
"where the Huygens probe landed east Adiri"]
feature_options.append(huygens_landing_site)

# Wrte to CSV
# Write to CSV
header_options = ["Feature Name",
"Northmost Latitude",
"Southmost Latitude",
Expand Down
2 changes: 1 addition & 1 deletion pydar/updateCsvSwathCoverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def updateCsvSwathCoverage():
lbl[13] = line.split("=")[1].strip()
lbl_information.append(lbl)

# Wrte to CSV
# Write to CSV
header_options = ["CORADR ID",
"FLYBY ID",
"SEGMENT NUMBER",
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
long_description=long_description_readme,
long_description_content_type='text/markdown',
url="https://github.com/unaschneck/pydar",
download_url="https://github.com/unaschneck/pydar/archive/refs/tags/v{0}.tar.gz".format(VERSION),
download_url=f"https://github.com/unaschneck/pydar/archive/refs/tags/v{VERSION}.tar.gz",
author="Una Schneck (unaschneck), Cora Schneck (cyschneck)",
keywords=[],
license="MIT",
Expand All @@ -27,6 +27,7 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down

0 comments on commit 338b604

Please sign in to comment.