Skip to content

Commit 5223691

Browse files
committed
Initial commit
1 parent a74af70 commit 5223691

File tree

428 files changed

+30508
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

428 files changed

+30508
-0
lines changed

.gitignore

Lines changed: 326 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,326 @@
1+
2+
# Created by https://www.gitignore.io/api/unity,csharp
3+
4+
### Csharp ###
5+
## Ignore Visual Studio temporary files, build results, and
6+
## files generated by popular Visual Studio add-ons.
7+
##
8+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
9+
10+
# User-specific files
11+
*.suo
12+
*.user
13+
*.userosscache
14+
*.sln.docstates
15+
16+
# User-specific files (MonoDevelop/Xamarin Studio)
17+
*.userprefs
18+
19+
# Build results
20+
[Dd]ebug/
21+
[Dd]ebugPublic/
22+
[Rr]elease/
23+
[Rr]eleases/
24+
x64/
25+
x86/
26+
bld/
27+
[Bb]in/
28+
[Oo]bj/
29+
[Ll]og/
30+
31+
# Visual Studio 2015 cache/options directory
32+
.vs/
33+
# Uncomment if you have tasks that create the project's static files in wwwroot
34+
#wwwroot/
35+
36+
# MSTest test Results
37+
[Tt]est[Rr]esult*/
38+
[Bb]uild[Ll]og.*
39+
40+
# NUNIT
41+
*.VisualState.xml
42+
TestResult.xml
43+
44+
# Build Results of an ATL Project
45+
[Dd]ebugPS/
46+
[Rr]eleasePS/
47+
dlldata.c
48+
49+
# .NET Core
50+
project.lock.json
51+
project.fragment.lock.json
52+
artifacts/
53+
**/Properties/launchSettings.json
54+
55+
*_i.c
56+
*_p.c
57+
*_i.h
58+
*.ilk
59+
*.meta
60+
*.obj
61+
*.pch
62+
*.pdb
63+
*.pgc
64+
*.pgd
65+
*.rsp
66+
*.sbr
67+
*.tlb
68+
*.tli
69+
*.tlh
70+
*.tmp
71+
*.tmp_proj
72+
*.log
73+
*.vspscc
74+
*.vssscc
75+
.builds
76+
*.pidb
77+
*.svclog
78+
*.scc
79+
80+
# Chutzpah Test files
81+
_Chutzpah*
82+
83+
# Visual C++ cache files
84+
ipch/
85+
*.aps
86+
*.ncb
87+
*.opendb
88+
*.opensdf
89+
*.sdf
90+
*.cachefile
91+
*.VC.db
92+
*.VC.VC.opendb
93+
94+
# Visual Studio profiler
95+
*.psess
96+
*.vsp
97+
*.vspx
98+
*.sap
99+
100+
# TFS 2012 Local Workspace
101+
$tf/
102+
103+
# Guidance Automation Toolkit
104+
*.gpState
105+
106+
# ReSharper is a .NET coding add-in
107+
_ReSharper*/
108+
*.[Rr]e[Ss]harper
109+
*.DotSettings.user
110+
111+
# JustCode is a .NET coding add-in
112+
.JustCode
113+
114+
# TeamCity is a build add-in
115+
_TeamCity*
116+
117+
# DotCover is a Code Coverage Tool
118+
*.dotCover
119+
120+
# Visual Studio code coverage results
121+
*.coverage
122+
*.coveragexml
123+
124+
# NCrunch
125+
_NCrunch_*
126+
.*crunch*.local.xml
127+
nCrunchTemp_*
128+
129+
# MightyMoose
130+
*.mm.*
131+
AutoTest.Net/
132+
133+
# Web workbench (sass)
134+
.sass-cache/
135+
136+
# Installshield output folder
137+
[Ee]xpress/
138+
139+
# DocProject is a documentation generator add-in
140+
DocProject/buildhelp/
141+
DocProject/Help/*.HxT
142+
DocProject/Help/*.HxC
143+
DocProject/Help/*.hhc
144+
DocProject/Help/*.hhk
145+
DocProject/Help/*.hhp
146+
DocProject/Help/Html2
147+
DocProject/Help/html
148+
149+
# Click-Once directory
150+
publish/
151+
152+
# Publish Web Output
153+
*.[Pp]ublish.xml
154+
*.azurePubxml
155+
# TODO: Uncomment the next line to ignore your web deploy settings.
156+
# By default, sensitive information, such as encrypted password
157+
# should be stored in the .pubxml.user file.
158+
#*.pubxml
159+
*.pubxml.user
160+
*.publishproj
161+
162+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
163+
# checkin your Azure Web App publish settings, but sensitive information contained
164+
# in these scripts will be unencrypted
165+
PublishScripts/
166+
167+
# NuGet Packages
168+
*.nupkg
169+
# The packages folder can be ignored because of Package Restore
170+
**/packages/*
171+
# except build/, which is used as an MSBuild target.
172+
!**/packages/build/
173+
# Uncomment if necessary however generally it will be regenerated when needed
174+
#!**/packages/repositories.config
175+
# NuGet v3's project.json files produces more ignorable files
176+
*.nuget.props
177+
*.nuget.targets
178+
179+
# Microsoft Azure Build Output
180+
csx/
181+
*.build.csdef
182+
183+
# Microsoft Azure Emulator
184+
ecf/
185+
rcf/
186+
187+
# Windows Store app package directories and files
188+
AppPackages/
189+
BundleArtifacts/
190+
Package.StoreAssociation.xml
191+
_pkginfo.txt
192+
193+
# Visual Studio cache files
194+
# files ending in .cache can be ignored
195+
*.[Cc]ache
196+
# but keep track of directories ending in .cache
197+
!*.[Cc]ache/
198+
199+
# Others
200+
ClientBin/
201+
~$*
202+
*~
203+
*.dbmdl
204+
*.dbproj.schemaview
205+
*.jfm
206+
*.pfx
207+
*.publishsettings
208+
orleans.codegen.cs
209+
210+
# Since there are multiple workflows, uncomment next line to ignore bower_components
211+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
212+
#bower_components/
213+
214+
# RIA/Silverlight projects
215+
Generated_Code/
216+
217+
# Backup & report files from converting an old project file
218+
# to a newer Visual Studio version. Backup files are not needed,
219+
# because we have git ;-)
220+
_UpgradeReport_Files/
221+
Backup*/
222+
UpgradeLog*.XML
223+
UpgradeLog*.htm
224+
225+
# SQL Server files
226+
*.mdf
227+
*.ldf
228+
*.ndf
229+
230+
# Business Intelligence projects
231+
*.rdl.data
232+
*.bim.layout
233+
*.bim_*.settings
234+
235+
# Microsoft Fakes
236+
FakesAssemblies/
237+
238+
# GhostDoc plugin setting file
239+
*.GhostDoc.xml
240+
241+
# Node.js Tools for Visual Studio
242+
.ntvs_analysis.dat
243+
node_modules/
244+
245+
# Typescript v1 declaration files
246+
typings/
247+
248+
# Visual Studio 6 build log
249+
*.plg
250+
251+
# Visual Studio 6 workspace options file
252+
*.opt
253+
254+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
255+
*.vbw
256+
257+
# Visual Studio LightSwitch build output
258+
**/*.HTMLClient/GeneratedArtifacts
259+
**/*.DesktopClient/GeneratedArtifacts
260+
**/*.DesktopClient/ModelManifest.xml
261+
**/*.Server/GeneratedArtifacts
262+
**/*.Server/ModelManifest.xml
263+
_Pvt_Extensions
264+
265+
# Paket dependency manager
266+
.paket/paket.exe
267+
paket-files/
268+
269+
# FAKE - F# Make
270+
.fake/
271+
272+
# JetBrains Rider
273+
.idea/
274+
*.sln.iml
275+
276+
# CodeRush
277+
.cr/
278+
279+
# Python Tools for Visual Studio (PTVS)
280+
__pycache__/
281+
*.pyc
282+
283+
# Cake - Uncomment if you are using it
284+
# tools/**
285+
# !tools/packages.config
286+
287+
# Telerik's JustMock configuration file
288+
*.jmconfig
289+
290+
# BizTalk build output
291+
*.btp.cs
292+
*.btm.cs
293+
*.odx.cs
294+
*.xsd.cs
295+
296+
### Unity ###
297+
/[Ll]ibrary/
298+
/[Tt]emp/
299+
/[Oo]bj/
300+
/[Bb]uild/
301+
/[Bb]uilds/
302+
/Assets/AssetStoreTools*
303+
304+
# Visual Studio 2015 cache directory
305+
/.vs/
306+
307+
# Autogenerated VS/MD/Consulo solution and project files
308+
ExportedObj/
309+
.consulo/
310+
*.csproj
311+
*.unityproj
312+
*.sln
313+
*.booproj
314+
*.svd
315+
316+
# Unity3D generated meta files
317+
*.pidb.meta
318+
319+
# Unity3D Generated File On Crash Reports
320+
sysinfo.txt
321+
322+
# Builds
323+
*.apk
324+
*.unitypackage
325+
326+
# End of https://www.gitignore.io/api/unity,csharp

Assets/ExpMngr/Scripts/Block.cs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace ExpMngr
7+
{
8+
/// <summary>
9+
/// A set of trials – often used to group a number of consecutive Trial objects that share something in common.
10+
/// </summary>
11+
[Serializable]
12+
public class Block
13+
{
14+
/// <summary>
15+
/// List of trials associated with this block
16+
/// </summary>
17+
public List<Trial> trials = new List<Trial>();
18+
/// <summary>
19+
/// Return the first trial in this block
20+
/// </summary>
21+
public Trial firstTrial { get { return trials.Count > 0 ? trials[0] : null; } }
22+
/// <summary>
23+
/// Return the last trial in this block
24+
/// </summary>
25+
public Trial lastTrial { get { return trials.Count > 0 ? trials[trials.Count-1] : null; } }
26+
/// <summary>
27+
/// Returns the block number of this block within the experiment session
28+
/// </summary>
29+
public int number { get { return experiment.blocks.IndexOf(this) + 1; } }
30+
31+
/// <summary>
32+
/// Block settings. These will be overidden by trial settings if set.
33+
/// </summary>
34+
public Settings settings = Settings.empty;
35+
36+
ExperimentSession experiment;
37+
38+
/// <summary>
39+
/// Creates a block for an associated experement session
40+
/// </summary>
41+
/// <param name="exp">Experiment session</param>
42+
public Block(ExperimentSession exp)
43+
{
44+
experiment = exp;
45+
experiment.blocks.Add(this);
46+
settings.SetParent(experiment.settings);
47+
}
48+
49+
/// <summary>
50+
/// Get a trial in this block by relative trial number (non-zero indexed)
51+
/// </summary>
52+
/// <param name="relativeTrialNumber">Trial number relative to block (non zero indexed)</param>
53+
/// <returns></returns>
54+
public Trial GetRelativeTrial(int relativeTrialNumber)
55+
{
56+
return trials[relativeTrialNumber - 1];
57+
}
58+
59+
}
60+
61+
}

0 commit comments

Comments
 (0)