-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjustments to SOIT implementation #96
Changes from all commits
9af1c74
f0bab77
39914a3
21db623
9f04631
55b0c41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,20 +41,18 @@ def __init___(self, args): | |
|
||
|
||
def get_passtimes( | ||
startdate, enddate, csvoutpath, centroid_x, centroid_y, SPACEUSER, SPACEPSWD | ||
startdate, enddate, csvoutpath, centroid_lat, centroid_lon, SPACEUSER, SPACEPSWD | ||
): | ||
centroidx = centroid_x | ||
centroidy = centroid_y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for changing variable names There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, I thought about updating those but didn't want to break the Docker stuff. |
||
configUsr = SPACEUSER | ||
configPwd = SPACEPSWD | ||
siteCred = {"identity": configUsr, "password": configPwd} | ||
end_date = datetime.datetime.strptime(enddate, "%Y-%m-%d").strftime("%m-%d-%Y").split("-") | ||
start_date = datetime.datetime.strptime(startdate, "%Y-%m-%d").strftime("%m-%d-%Y").split("-") | ||
lat = int(centroidx) | ||
long = int(centroidy) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change in variable names is just personal preference. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember if that's just how the original script was or if there was a reason we had to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did, it ran perfectly fine with float lat/lon on my machine |
||
lat = float(centroid_lat) | ||
lon = float(centroid_lon) | ||
print(f"Outpath {csvoutpath}") | ||
print(f"Timeframe starts on {start_date}, and ends on {end_date}") | ||
print(f"Centroid (x, y): ({centroidx}, {centroidy})") | ||
print(f"Coordinates (x, y): ({centroid_lat}, {centroid_lon})") | ||
|
||
end_date = getNextDay(end_date) | ||
|
||
|
@@ -100,7 +98,7 @@ def get_passtimes( | |
ts = load.timescale() | ||
|
||
# Specify area of interest. | ||
aoi = wgs84.latlon(lat, long) | ||
aoi = wgs84.latlon(lat, lon) | ||
|
||
# Define today and tomorrow. | ||
today = start_date | ||
|
@@ -375,7 +373,7 @@ def get_passtimes( | |
today = getNextDay(today) | ||
tomorrow = getNextDay(today) | ||
|
||
csvwrite(start_date, end_date, lat, long, rows, csvoutpath) | ||
csvwrite(start_date, end_date, lat, lon, rows, csvoutpath) | ||
|
||
|
||
# Write CSV of all pass information. | ||
|
@@ -459,17 +457,18 @@ def main(): | |
help="End date in format YYYY-MM-DD", | ||
) | ||
parser.add_argument( | ||
"--centroid_x", | ||
"-x", | ||
metavar="centroid_x", | ||
"--centroid_lat", | ||
"-lat", | ||
metavar="centroid_lat", | ||
type=str, | ||
help="x-coordinate of bounding box centroid", | ||
help="latitude of bounding box centroid", | ||
) | ||
parser.add_argument( | ||
"--centroid_y", | ||
"-y", | ||
"--centroid_lon", | ||
"-lon", | ||
metavar="centroid_lon", | ||
type=str, | ||
help="y-coordinate of bounding box centroid", | ||
help="longitude of bounding box centroid", | ||
) | ||
parser.add_argument( | ||
"--csvoutpath", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra space in line 23 was giving me an uninformative error from docker "docker: invalid reference format". Deleting the space between
brownccv/
andicefloetracker-fetchdata:main
made it so it would run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find!