changes that were left on linux

quietlight
Nov 10, 2024, 10:15 PM
UTM4NN576ZBJR4WMEQBUP26FG2JLNLRAQQWZJSHGT6VH2ABYSDWAC

Dependencies

  • [2] DJBAVTVO tidied up make_clips_generic
  • [3] 2UBDFCJH new files tracked
  • [4] ROFI4OLA catch up, working on colour images
  • [5] AQWXGGE3 mod to clips.jl
  • [6] X54TLSYE catch up commit, train now working with julia 1.10.5 but not 1.11
  • [7] 7KO4BAOG Tidy up
  • [8] QA2TJZRA ripped ML out into the SkraakML repo, compiles quicker now
  • [9] MMG2PLXK new functiion to make clips of downloaded bisd calls

Change contents

  • replacement in src/Clips.jl at line 69
    [3.3871][3.3871:3963]()
    x -> Skraak.rename_column!(x, "1.0", "label") |> #can remove now, needs to be label
    [3.3871]
    [3.3963]
    x -> Skraak.rename_column!(x, "1.0", "label") |> #can remove now, for old opensounscape model needs to be label
    x -> rename_column!(x, "Kiwi", "label") |> #for new model Kiwi needs to read as label
  • replacement in src/Clips.jl at line 331
    [3.105][3.2262:2388]()
    a=Glob.glob("*/*/preds-2024-08-29.csv")
    b=Glob.glob("*/*/*/preds-2024-08-29.csv")
    c=Glob.glob("*/*/*/*/preds-2024-08-29.csv")
    [3.105]
    [3.2388]
    predictions = glob("*/*/preds-2024-10-21.csv")
    For Kahurangi (1) Data
    a=glob("Manu*/['m','X']*/*/preds_Kahurangi_1-2_ST_2024-10-29.csv")
    b=glob("Manu*/['m','X']*/*/*/preds_Kahurangi_1-2_ST_2024-10-29.csv")
    c=glob("Manu*/['m','X']*/*/*/*/preds_Kahurangi_1-2_ST_2024-10-29.csv")
    predictions = [a ; b ; c]
    a=glob("Manu*/['m','X']*/*/preds4_Kahurangi_1-2_2024-10-29.csv")
    b=glob("Manu*/['m','X']*/*/*/preds4_Kahurangi_1-2_2024-10-29.csv")
    c=glob("Manu*/['m','X']*/*/*/*/preds4_Kahurangi_1-2_2024-10-29.csv")
    predictions = [a ; b ; c]
    a=glob("Manu*/['m','X']*/*/preds3_Kahurangi_1-2_2024-10-29.csv")
    b=glob("Manu*/['m','X']*/*/*/preds3_Kahurangi_1-2_2024-10-29.csv")
    c=glob("Manu*/['m','X']*/*/*/*/preds3_Kahurangi_1-2_2024-10-29.csv")
  • replacement in src/Clips.jl at line 348
    [3.2414][3.2414:2472]()
    ## or
    predictions = Glob.glob("*/*/preds-2024-10-21.csv")
    [3.2414]
    [3.478]
    For Kahurangi (2) Data
    predictions=glob("Manu*/m*/preds_Kahurangi_1-2_ST_2024-10-29.csv")
    predictions=glob("Manu*/m*/preds4_Kahurangi_1-2_2024-10-29.csv")
    predictions=glob("Manu*/m*/preds3_Kahurangi_1-2_2024-10-29.csv")
    For Cobb
    predictions=glob("Friends*/preds_Kahurangi_1-2_ST_2024-10-29.csv")
    predictions=glob("Friends*/preds4_Kahurangi_1-2_2024-10-29.csv")
    predictions=glob("Friends*/preds3_Kahurangi_1-2_2024-10-29.csv")
    Flora
    a=glob("*/*/preds_Kahurangi_1-2_ST_2024-10-31.csv")
    b=glob("*/*/*/preds_Kahurangi_1-2_ST_2024-10-31.csv")
    c=glob("*/*/*/*/preds_Kahurangi_1-2_ST_2024-10-31.csv")
    predictions=[a;b;c]
    # to delete empty preds.csv files, should be ok now with improved python script
    for file in list
    size = stat(file).size
    if size < 10
    println("Deleting $file - $size")
    rm(file)
    end
    end
  • replacement in src/Clips.jl at line 376
    [3.2501][3.2501:2526]()
    make_clips_generic(file)
    [3.2501]
    [3.2526]
    make_clips_generic(file, 1, Flora1_K1-2-ST, false)
  • replacement in src/Clips.jl at line 382
    [3.2150][3.2546:2610]()
    function make_clips_generic(preds_path::String, label::Int = 1)
    [3.2150]
    [3.2553]
    function make_clips_generic(
    preds_path::String,
    label::Int ##= 1, needs looking at here TODO
    id::String,
    unique_file_names = true,
    )
  • replacement in src/Clips.jl at line 402
    [3.3125][3.3125:3217]()
    x -> Skraak.rename_column!(x, "1.0", "label") |> #can remove now, needs to be label
    [3.3125]
    [3.3217]
    x -> Skraak.rename_column!(x, "1.0", "label") |> #can remove now, for old opensoundscape kiwi model needs to be label
    x -> Skraak.rename_column!(x, "Kiwi", "label") |> #for new kiwi model needs to be label
  • replacement in src/Clips.jl at line 412
    [3.3572][3.3572:3620]()
    start_times = v[!, :start_time] |> sort
    [3.3572]
    [3.3620]
    start_times =
    v[!, :start_time] |> x ->
    dropmissing(x, disallowmissing = true) |> ######CHECK used to make cobb work
    sort
  • replacement in src/Clips.jl at line 429
    [3.4088][2.10:304](),[2.304][3.4385:4488](),[3.4385][3.4385:4488](),[3.4488][3.4488:4523]()
    ##p = replace(pth, "/" => "--") #replace / with -- including trailing /
    ##name = "$p$file_name-$(Int(floor(st/freq)))-$(Int(ceil(en/freq)))"
    name = "$file_name-$(Int(floor(st/freq)))-$(Int(ceil(en/freq)))" #leave off path, not necesaray if unique file names
    ##name = "$location-$h-$trip_date-$file_name-$(Int(floor(st/freq)))-$(Int(ceil(en/freq)))"
    f = "Clips_$(today())"
    [3.4088]
    [3.4523]
    if unique_file_names == true
    name = "$file_name-$(Int(floor(st/freq)))-$(Int(ceil(en/freq)))" #leave off path, not necesaray if unique file names
    else
    p = replace(pth, "/" => "--") #replace / with -- including trailing /
    name = "$p$file_name-$(Int(floor(st/freq)))-$(Int(ceil(en/freq)))"
    end
    f = "Clips_$id_$(today())"