Skip to content

Commit

Permalink
Remove Compat.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-luke committed Sep 2, 2016
1 parent da67d4d commit 9e008f2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion REQUIRE
@@ -1,7 +1,6 @@
julia 0.5-

AWS
Compat
DSP
BDF
DataFrames
Expand Down
1 change: 0 additions & 1 deletion src/EEG.jl
@@ -1,7 +1,6 @@
module EEG

using Logging, # For user feedback
Compat, # For backward julia compatability
SIUnits, # Smarter units
SIUnits.ShortUnits,
DataFrames,
Expand Down
4 changes: 2 additions & 2 deletions src/types/SSR/ReadWrite.jl
Expand Up @@ -178,15 +178,15 @@ function system_code_channel(a::SSR; kwargs...)
end


function write_SSR(a::SSR, fname::AbstractString; chanLabels=channelnames(a), subjID=a.header["subjID"],
function write_SSR{S <: AbstractString}(a::SSR, fname::S; chanLabels=channelnames(a), subjID=a.header["subjID"],
startDate=a.header["startDate"], startTime=a.header["startTime"], kwargs...)

fname = convert(String, fname)

Logging.info("Saving $(size(a.data)[end]) channels to $fname")

writeBDF(fname, a.data', trigger_channel(a), system_code_channel(a), samplingrate(Int, a),
chanLabels = convert(Array{Compat.ASCIIString, 1}, chanLabels),
chanLabels = convert(Array{S, 1}, chanLabels),
startDate = startDate, startTime = startTime, subjID = subjID)

end
4 changes: 2 additions & 2 deletions src/types/SSR/SSR.jl
Expand Up @@ -401,7 +401,7 @@ If multiple channels are listed then the average of those channels will be added
s = merge_channels(s, ["P6", "P8"], "P68")
```
""" ->
function merge_channels(a::SSR, merge_Chans::Array{Compat.ASCIIString}, new_name::Compat.ASCIIString; kwargs...)
function merge_channels{S <: AbstractString}(a::SSR, merge_Chans::Array{S}, new_name::S; kwargs...)

debug("Number of original channels: $(length(channelnames(a)))")

Expand All @@ -418,7 +418,7 @@ function merge_channels(a::SSR, merge_Chans::Array{Compat.ASCIIString}, new_name
a = add_channel(a, vec(mean(a.data[:,keep_idxs], 2)), new_name; kwargs...)
end

function merge_channels(a::SSR, merge_Chans::Compat.ASCIIString, new_name::Compat.ASCIIString; kwargs...)
function merge_channels{S <: AbstractString}(a::SSR, merge_Chans::S, new_name::S; kwargs...)
a = merge_channels(a, [merge_Chans], new_name; kwargs...)
end

Expand Down

0 comments on commit 9e008f2

Please sign in to comment.