Skip to content

Commit 267f2ec

Browse files
committed
SimData NamedTuple alias into misc, and print_type_compactly func :)
1 parent 351dd52 commit 267f2ec

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pkg/VoltoMapSim/src/VoltoMapSim.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ const datamodel_version = "2 (net)"
1313
include("units.jl")
1414
# [see file for exports]
1515

16-
const SimData = NamedTuple
17-
1816
include("misc.jl")
19-
export LogNormal_with_mean, ptp, area, bin, jn
17+
export LogNormal_with_mean, ptp, area, bin, jn, print_type_compactly
2018

2119
include("params.jl")
2220
@alias ExpParams = ExperimentParams
@@ -26,7 +24,7 @@ include("diskcache.jl")
2624
export cached, cachefilename
2725

2826
include("sim/sim.jl")
29-
export sim, add_VI_noise, augment, calc_avg_STA, calc_avg_STA_v2
27+
export sim, add_VI_noise, augment, calc_avg_STA
3028

3129
include("conntest.jl")
3230
export calc_STA, to_ISIs, to_spiketimes!, shuffle_ISIs, test_connection

pkg/VoltoMapSim/src/misc.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ function bin(spiketimes; duration, binsize)
3636
bin_end_time += binsize
3737
end
3838
end
39+
40+
41+
const SimData = NamedTuple
42+
43+
# Hack to not have the NamedTuple containing simulation data take up huge amounts of space
44+
# in stacktraces and such.
45+
print_type_compactly(x, typename = "SimData") =
46+
eval( :(Base.show(io::IO, ::Type{typeof($x)}) = print(io, $typename)) )

0 commit comments

Comments
 (0)