Skip to content
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

54 use getlatlon from ift #55

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.1.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Folds = "41a02a25-b8f0-4f67-bc48-60067656b558"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
IceFloeTracker = "04643c7a-9ac6-48c5-822f-2704f9e70bd3"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand Down
7 changes: 4 additions & 3 deletions src/IFTPipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ using ArgParse
using LoggingExtras
using IceFloeTracker
using IceFloeTracker: DataFrames, Dates, @dateformat_str, DataFrame, nrow, rename!, Not, select!, Date, Time, DateTime
using IceFloeTracker: Folds, RGB, Gray, load, float64, imsharpen
using IceFloeTracker: RGB, Gray, load, float64, imsharpen, getlatlon
using Folds
using HDF5
using TOML: parsefile
using PyCall
using Pkg
include("cli-config.jl")
include("soit-parser.jl")
Expand Down Expand Up @@ -39,7 +39,8 @@ export cache_vector, sharpen,
mkcliextract!,
mkclitrack!,
mkfilenames,
makeh5files
makeh5files,
getlatlon

export IceFloeTracker
end
2 changes: 0 additions & 2 deletions src/h5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ The `floe_properties` group contains a floe properties matrix `properties` for `
The `index` group contains the spatial coordinates in the source image coordinate reference system (default NSIDC polar stereographic, meters) and geographic coordinates (latitude and longitude, decimal degrees). Estimated satellite overpass time `time` is provided in Unix timestamp format (seconds since 1970-01-01 00:00 UTC).
"""
function makeh5files(; pathtosampleimg::String, resdir::String)
@pyinclude(joinpath(@__DIR__, "latlon.py"))
getlatlon = py"getlatlon"
latlondata = getlatlon(pathtosampleimg)

iftversion = getiftversion()
Expand Down
25 changes: 0 additions & 25 deletions src/latlon.py

This file was deleted.

4 changes: 1 addition & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using IFTPipeline
using IFTPipeline: load_imgs, sharpen, sharpen_gray, loadimg
using IFTPipeline: HDF5, h5open, attrs
using .IceFloeTracker: DataFrames, save, Gray, create_cloudmask, deserialize, serialize, float64, load, imrotate, loadimg, RGB, DataFrame, nrow, rename!, Dates, Not, select!
using .IceFloeTracker: DataFrames, save, Gray, create_cloudmask, deserialize, serialize, float64, load, imrotate, loadimg, RGB, DataFrame, nrow, rename!, Dates, Not, select!, getlatlon
using ArgParse: @add_arg_table!, ArgParseSettings, add_arg_group!, parse_args
using DelimitedFiles
using PyCall: @pyinclude, @py_str
using Pkg
using Random
using Serialization
using Test
using Conda
include(joinpath(@__DIR__, "config.jl"))

function test_similarity(imgA::BitMatrix, imgB::BitMatrix, error_rate=0.005)
Expand Down
2 changes: 0 additions & 2 deletions test/test-h5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ resdir = joinpath(dirname(pathtosampleimg), "h5")

originalbbox = (latitude=[81, 79], longitude=[-22, -12])

@pyinclude(joinpath(@__DIR__, "../src/latlon.py"))
getlatlon = py"getlatlon"
latlondata = getlatlon(pathtosampleimg)

getcorners(m) = [m[1, 1], m[end, end]]
Expand Down