忍者ブログ
おかげさまでspamコメントが増えてきましたので、一応コメントを承認制にしました。基本的には承認します。
[1] [2]

これはまあ,多分optseq2に限らないんでしょうが.こんなエラーが出ました.

optseq2(1241) malloc: *** error for object 0x16b4620: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
optseq2(1241) malloc: *** error for object 0x16b4710: incorrect checksum for freed object - object was probably modified after being freed.

*** set a breakpoint in malloc_error_break to debug
bus error
mallocというのは,メモリを確保(allocate)するための関数,ということなのでメモリが足りないってことですかね?checksumというのは,データ送受信の誤り検出方法だそうです.freedは,これだけで検索しても出てこなかったので直訳.解放だそう.だから,optseq2のメモリ確保において,0x16b4620というオブジェクト解放オブジェクトのチェックサムが一致しないと.何をいっているかわからん!

bus errorというのは,wikipediaによればアクセスできないところにアクセスしようとしている,ということのようで,うーん,アヤシいのは,seedvalのようなきがするよ….srand48()の中に入れるseedvalは,乱数の初期値であって,ここから分布する疑似乱数を作る(らしい)ので,この値がでかすぎて,アクセスしちゃダメなところにいったんじゃねーの,的な?(ハイパーアバウト)

で,実際,seedを256とかにしてみたら,もうちょい進むようになって,optseq()mallocの()の中の数が変わったよ!でも止まるは止まるよ!みたいな!すいません,これが限界です.

少ない回数(10万回とか)だったら成功します.別のPCだとうまくいったりして,よくわかんねーなー,というのが正直なところ.

拍手[1回]

PR

とりあえず分かった事を書きます.まず,optseq2をダウンロードして,ターミナルを開きます.そして,フルパスで(パスを通せる人は,optseq2があるディレクトリにパスを通して,渡辺にmacでのパスの通し方を教えて下さい.閑話休題;macだったら,shift+⌘(コマンド)でspotlightを開いて,optseq2を一回実行してやれば,勝手にログアウトされますが最初の方にパス名が書いてあるのでそれをコピペするとか,あとoptseq2自体をターミナルにドラッグ&ドロップするとそのパスがわかるそうです.情報提供ありがとうございます).optseq2を指定して,以下に--commandを書いていきます.たとえば以下のように.

/Users/watanabehayato/Downloads/optseq2 --ntp 100 --tr 3 --psdwin 0 30 --ev evt1 6 21 --nsearch 10000 --seed 380996 --nkeep 4 --o watanabe
で,エンターを押すと,optseq2が実行されます.

そうしますと,12列からなるサーチ情報が表示されます.これは,--log logfileで出力されるものと多分同一の内容です.(中身はここの下の方に書いてあります).さらに,watanabe-001.par, watanabe-002.par watanabe-003.par, watanabe-004.parというファイルが生成されます.ここで,watanabeの部分は,--oで指定した名前であり,生成されるファイル数は,--nkeepで指定した回数になります.

.parファイルはテキストエディタで開くことができ,開くと5列からなる情報が表示されます.これも,さっきのリンクの--o outstemの部分をご参照ください.今のところ良くわかっていないのが,

  • evt1が連続して生じることがあるが,これはokと見なしてよいのか?→どうやら良いらしい.SPMを勉強したらわかるみたいだけど勉強…か…的な.
  • preevt-evt-postevtというような組み方をする場合の,pre-evt-postの間隔の設定はできないのか?→できないっぽい.
の2点.前者は,null刺激を強制することでかならずnull刺激が入るので,okかどうかはあまり良くわかりませんがいれておいた方がいいのかな,と思いますが,後者のような一連のイベントそれぞれの時点での撮像をしたい,というときに,各イベント間に(順番は固定で)null刺激をどう置くのが良いか,ということはわからないような気がします.pre-evt-postをひとくくりで「evt」として,ITIを見ることはできると思いますが.

ついでに,過去に書いていますがコマンドについて簡単に説明しておきます.--tr value(second) valueの所には数字をいれます(以下同じ).ここでは時間解像度を指定します.お使いのMR機器で良く使われる設定に合わせてください.うちはTR 3(秒)で撮っているそうなので,そうして(--tr 3として)います.--ntp value ここで指定した値*TRが,総撮像時間になります.たとえば,100だったら,100*TR(今は3なので,100*3ということにしましょうか,そうすると300)秒が,総撮像時間になります.ここは勝手に決めて良いようですが,あまり短くするとefficiencyが下がります.実験参加者が疲れなさそうで,かつなるべく長めにすると良さそうです.--psdwin psdmin psdmax dpsd psdminもpsdmaxもdpsdもvalueです.psdというのは,post stimulus durationの略だそうです.psdminには刺激後の最小持続時間(0にしてます),psdmaxは刺激後の最大持続時間(どう決めたらいいか明確な指針をご紹介できませんが,TRの10倍が目安っぽいのでそうしています),dPSDは時間解像度そのままでいいみたいです.--nsearch value では,サーチ回数を選びます.これは完全に渡辺の理解なので誤解があろうかとおもいますが,どうも,optseq2は,コマンドで指定した設定を満たす条件を,大量に検索し,その有効性(efficiency)が最大になったときに後で書きますが--nkeep数だけ保存する,という方法をとっているようです.たとえば,3秒のイベントが10回おこる,時間解像度3秒で,タイムポイントが11,で,psdwinが0 30 3,みたいな条件であれば,NULL刺激が入る余地は1個しかないので11通り(かな?)を全部調べる,ということですね.で,もっとイベントとタイムポイントが多くなれば,11通りじゃ当然きかないので,大量の設定を満たす条件を調べて,efficiencyを求めて行く,ということをやるわけです.ただ,凄まじい回数になる(場合がある)ので,ここで上限を決めておく訳ですね.ちなみに,10000回は1分以内でおわりますので,100万回くらいは余裕でまわせるでしょう(機械はプロセッサが2.4gHz Intel core 2 duo, メモリ4G 667MHzのmacbookです).--tsearch value(hour)というコマンドもあって,これだと一時間単位でまわせます.夜に5ー6時間ぶん回しといてもいいかもしれません.で,--nkeep valueは,ここで最適だった順番をvalue数だけ保存します.--o string (stringは文字列ね)で,その名前のファイルを出力します.はじめだけ,seedvalueを指定することを求められるかもしれません.

INFO: Setting srand48() seed to 806036
とかのINFOが出ます.そのときは,--seed 806036とか入れてやれば良さそうです.この数字が乱数生成のタネになるようです.

というところでしょうか.このくらいを1日で理解できるようになればなー,と思いますが,しょうがないね!文系だからね!

拍手[0回]

リンクはこちら.
These exercises are intended to introduce the user to optseq. See the Optseq Home Page at http://surfer.nmr.mgh.harvard.edu/optseq for more info.

--------------------------------------------------------------------------
Exercise 0. View the optseq help page:
optseq2 --help | less
--------------------------------------------------------------------------
Exercise 1. Create a schedule with a single non-null event type for a run with 100 time points with TR = 2 sec. The trial type will have the label 'evt1', will last 2 sec, and will be repeated 30 times. The 3 best schedules will be kept. Set the PSD window to 20 sec (which should be enough to capture the response to a 2 sec event). Note that the dPSD is implicitly set to the TR because there are only two parameters that follow --psdwin.
TR =2秒で,100タイムポイントがあるランで,単一のnullのないイベントタイプのスケジュールを作成する.トライアルタイプは,'evt1'のラベルで,2秒で終わる.そして,30回繰り返される.3つのベストスケジュールが保存される.PSD窓は,20秒に設定する(2秒のイベントの反応を捕捉するには十分である).dPSDは,TRのために暗黙にセットされる.なぜなら,--psdwinには,パラメータがふたつしかないからである.
optseq2 --ntp 100 --tr 2 \ --psdwin 0 20 \ --ev evt1 2 30 \ --nkeep 3 \ --o ex1 \ --nsearch 10000
There will be five files created by this process. The three schedules will be stored in ex1-001.par, ex1-002.par, and ex1-003.par. Each file will have 4 columns corresponding to: (1) stimulus onset time, (2) event type numeric id, (3) event duration, and (4) event type label. ext1.log is a file that contains information about the progress of the optimization. It is created when the process starts, and the process adds to it after it has completed each 10% of the search or when one of the best schedules changes. ex1.sum is a summary file with information about how optseq2 was run, statistics about the search, and statistics about each of the kept schedules.
この過程により,5つのファイルが生成される.3つのスケジュールは,ex1-001.par, ex1-002.par, ex1-003.parに保存される.各々のファイルは,4行で構成されている.(1)刺激オンセット時間,(2)イベントタイプの数字ID,(3)イベントの持続時間,および(4)イベントタイプのラベルである.ext1.logは,最適化の向上(progress)についての情報を含む.これは,処理が始まるときに作成され,サーチの10%ごとに,あるいはひとつの最適のスケジュールが変化したときに構成される.ex1.sumは,どのようにoptseq2が実行されたかについての情報があるサマリーファイルで,サーチについての統計,および各々のキープされたスケジュールの統計が入っている.
Look at one of the event schedule files (eg, ex1-001.par). Notice that while the duration of event type 1 is constant at 2 seconds, the duration of the Null event can change (but will always be a multiple of the dPSD).
イベントスケジュールファイル(eg, ex1-001.par)を見よ.イベントタイプ1の持続時間が,2秒で一貫していること,Nullイベントの持続時間が変化していることに注目せよ(しかし,dPSDの整数倍になっている).
Look in the summary file (ex1.sum). What was the efficiency for the best schedule? Re-run with 60 and 90 repetitions. How does the efficiency change? How high can the number of repetitions go before you encounter a time violation?
summary file(ex1.sum)を見よ.ベストスケジュールの効果性はなにか?60-90回で再実行せよ.どのくらい効果性が変わるか?あなたが時間妨害に会う前に,どのくらい繰り返しの数が高くなるか? --------------------------------------------------------------------------
Exercise 2. Create a schedule with three non-null event types for a run with 120 time points and TR = 2.5 sec. Event type 1 will have a duration of 2.5 sec with 20 repetitions. Event type 2 will have a duration of 5.0 sec with 10 repetitions, and event type 3 will have a duration of 7.5 sec with 15 repetitions. Set the PSD window to 25 sec to assure that the response to event type 3 can be captured; explicitly set the temporal resolution (ie, the dPSD) to one TR.
TR = 2.5秒で,120のタイムポイントがある,3つの非nullイベントタイプのスケジュールを作成する.イベントタイプ1は,2.5秒で20回繰り返される.イベントタイプ2は,5.0秒で10回繰り返される.イベントタイプ3は,7.5秒で15回繰り返される.イベントタイプ3の反応を確実に捕捉するため,PSDウインドウは25秒にセットした.ひとつのTRに対する時間解像度(つまりdPSD)が明示的にセットされる.

optseq2 --ntp 120 --tr 2.5 \ --psdwin 0 25 2.5\ --ev evt1 2.5 20 \ --ev evt2 5.0 10 \ --ev evt3 7.5 15 \ --nkeep 3 \ --o ex2 \ --nsearch 1000
Look at one of the event schedule files (eg, ex2-001.par) to verify that event onsets always occur at integer multiples of the dPSD (2.5). What was the efficiency of the best schedule?
dPSD(2.5)の整数倍でいつもイベントオンセットが起こることを検証するために,ひとつのイベントスケジュールファイル(eg, ex2-001.par)を見よ.ベストスケジュールの効果性はどうなっているか?
Change the dPSD to half a TR (ie, --psd 0 25 1.25). How did this change the efficiency? Verify that event onsets always occur at integer multiples of the new dPSD, and that the Null durations are always an integer multiples of the new dPSD.
dPSDをTRの半分(つまり,--psd 0 25 1.25)に変えてみよ.どのくらい効果性が変化したか?イベントオンセットが新しいdPSDの整数倍になっていることを確認し,Null持続時間がいつも新しいdPSDの整数倍になっていることを確認せよ.
Create a DOF violation by changing the dPSD to .0625.
dPSDを.0625に変更することで,あたらしいDOFを作成せよ.

拍手[0回]

数式のところは重い(精神的に)ので,いずれ…

ALGORITHM OVERVIEW

optseq2 randomly searches the space of schedules given the constraints
on the command-line and keeps the ones that maximize the given cost
function. Each search iteration begins by creating a random order of
events with the appropriate number of repetitions for each event
type. First order counter-balancing optimization, if done, is
performed here. Next, the timing is generated by inserting random
amounts of NULL stimulus so that the total stimulation time plus null
time is equal to the total scan time.

optseq2は,コマンドライン上に与えられた制約のスケジュールの空間をランダムにサーチし,与えられたコスト関数が最大になるものを保存する.各々のサーチの反復は,各々のイベントタイプの繰り返しの適切な数のイベントのランダム順の作成によってはじまる.一次のカウンターバランス最適化は,もしされれば,ここでなされる.次に,タイミングはNULL刺激のランダム量の挿入によって生成される.つまり,全刺激時間+null時間=全スキャン時間となる.

Event onset times are
constrained to be integer multiples of dPSD. An FIR design matrix is
created from this schedule. The FIR peristimulus window begins at
PSDMin and ends at PSDMax and is incremented by dPSD. If polynomial
regressors are specified, they are appended to the FIR matrix to give
the final design matrix, hereafter referred as X. The various costs
are computed from X. The forward model is then y = XB+n, which has the
solution Bhat = inv(XtX)Xy. A contrast is Ghat = C*Bhat, where C is the
the contrast matrix.

イベントのオンセット時間は,dPSDの整数倍として制約される.FIRデザインマトリクスは,このスケジュールから作成される.FIR周辺刺激(peristimulus)窓は,PSDMinからはじまり,PSDMaxで終わる.そして,dPSDによって増大させられる.もし多項式回帰が特定されれば,最後のデザインマトリクスを与える為のFIRマトリクス に関わり,その後,Xとして参照される.この変数コストは,Xから計算される.次のモデルは,y = XB + n,解のBhat = inv(XtX)Xyである.コントラストはGhat = C*Bhatで,Cはコントラストマトリクスである.

CONTRAST MATRIX

By default, the contrast matrix is the identity over all task-related
components. The contrast matrix can be changed by specifying --evc
(and possibly --sumdelays).

デフォルトでは,コントラストマトリクスは,全ての課題関係要素によって同定される.コントラストマトリクスは,--evc (あるいは--sumdelays)によって変化する.

COST FUNCTIONS

First-Order Counter-Balancing (FOCB). The FOCB matrix is the
Nevt-by-Nevt matrix of probabilities that one event type follows
another, where Nevt is the number of event types (excluding the NULL
condition). This is computed only from the sequence of events and is
independent of the timing (this is why it is referred to as
'pre-optimization').

一次のカウンターバランス(FOCB).FOCBマトリクスは,他のものに続くひとつのイベントタイプの確率のNevt-by-Nevt (Nイベント×Nイベント,かな)マトリクスであり,Nevtは,イベントタイプの数(Null条件を除く)である.これは,イベントのシークエンスからのみ計算され,タイミングの独立がある(そういうわけで,これは'pre-optimization'として参照される).

The ideal FOCB matrix can be computed from the
number of repetitions for each event type. The FOCB cost matrix is
computed by subtracting the actual probability from the ideal and then
dividing by the ideal. The final cost is computed by averaging the
absolute values of all elements in the cost matrix. This cost is
minimized during pre-optimization. FOCB optimization can be combined
with any other cost function. Note: FOCB requires that there be at
least 2 event types.

理想のFOCBマトリクスは,各々のイベントタイプの繰り返しの数から計算される.FOCBコストマトリクスは,理想の確率から実際の確率を引いた物によって計算さ,理想によって分けられる.最終のコストは,コストマトリクスにおける全ての要素の絶対値の平均によって計算される.このコストは,pre-optimizationの間に最小化される.FOCB最適化は,他のどのようなコスト関数とも結合する.注意:FOCBは,少なくとも2種類のイベントタイプを必要とする.

Efficiency (eff). Efficiency is defined as eff = 1/trace(C*inv(Xt*X)*Ct)
(note: any nuisance regressors are not included in the computation of
the trace but are included in the computation of the inverse). The
quantity trace(C*inv(XtX)*Ct) is a measure of the sum square error in Ghat
(ie, G-Bhat) relative to the noise inherent in the experiment. Therefore,
maximizing eff is a way of finding a schedule that will result in, on
average, the least error in Ghat.

Average Variance Reduction Factor (vrfavg). The Variance Reduction Factor
(VRF) is the amount by which the variance of an individual estimator (ie,
a component of Ghat) is reduced relative to the noise inherent in the
experiment. The VRF for a estimator is the inverse of the corresponding
component on the diagonal of C*inv(XtX)*Ct. The average VRF is this value
averaged across all estimators. This will yield similar results as when
the efficiency is optimized.

Average/StdDev Variance Reduction Factor (vrfavgstd). The cost is defined
as cost = vrfavg - W*vrfstd, where vrfstd is the standard deviation of
the VRFs and W is a weighting factor specified as a parameter on the
command-line. This penalizes schedules that result in large variations
in the individual VRFs of the estimators. There is currently a bug in
the implementation that causes it to mis-state the cost when the number
of repetitions are different for different event types. Also, only use
this cost when using a prescan window equal to or greater than the
PSD window (otherwise there will be a tendency not to schedule events
near the end of the run).

THE SUMMARY FILE

The summary file summarizes the conditions under which the search was
performed as well as the properties of each schedule found. It also
includes the number of iterations searched and the time it took to
search them as well as the average and standard deviation of the cost
measured over all schedules. It also includes the maximum efficiency
and average VRF over all schedules (these will be the same as the
best schedule if the eff or vrfavg cost functions were chosen).

Each schedule is summarized in a table with the following columns:
(1) Rank, (2) Cost, (3) ZCost, (4) Iteration Number (NthIter), (5)
Efficiency (Eff), (6) FOBC Error (CB1Err), (7) Average VRF (VRFAvg),
(7) StdDev VRF (VRFStd),
(8) Minimum VRF (VRFMin), (9) Maximum VRF (VRFMax), and (10) VRF
Range (VRFRng). Many of these measures have been described above.
ZCost is the number of standard deviations from the average cost
(over all schedules). The Iteration Number is the search iteration that
that schedule was found on. The first-order counter-balancing
measures come after this table. First, the ideal FOCB probability
matrix is printed followed by the actual matrix for each of the
schedules. Note: the printed ideal matrix is based on the nominal number
of repetitions. See BUGS.

CHOOSING PARAMETERS SETS

There are several parameters that must be chosen as a group because
they rely and/or relate to each other. These parameters are: (1) the
number of time points (Ntp), (2) the TR, (3) the prescan window (tPreScan),
(4) the duration of each event type (tEv), and (5) the number of repetitions
of each event type (nReps). The most basic relationship requires that
the total amount of stimulation time (tStimTot) be less than or equal to
the total amount of scan time (tScanTot), where tStimTot = sum(tEv*nReps)
(summed over all conditions), and tScanTot = Ntp*TR+tPreScan, so

sum(tEv*nReps) <= Ntp*TR+tPreScan (1)

If this constraint is not met, you will receive a 'Time Constraint
Violation' Error. The total amount of time dedicated to the Null stimulus
(tNullTot) is equal to the difference between the total scan time and
the total stimulation time:

tNullTot = Ntp*TR+tPreScan - sum(tEv*nReps) (2)

If the parameters are chosen such that equality results in equation (1),
then there will not be any time for the Null stimulus, which is generally
not good because inter-stimulus jitter is dependent upon inserting
random amounts of Null between non-Null stimuli.

A rule of thumb is to allocate as much time for the Null as one would for
any other stimulus. This can be done by choosing parameters such that

sum(tEv*nReps)(nEv+1)/nEv = Ntp*TR+tPreScan (3)

where nEv is the number of event types. The schedule can be optimized
around this point by allowing the number of repetitions to vary around
this nominal value.

There is also a DOF constraint which requires that the number of parameters
estimated be less than the number of time points, ie

Nbeta = nPSD*nEv+(PolyOrder+1) < Ntp (4)

where Nbeta is the number of parameters, nPSD is the number of elements
in the post-stimulus time window (ie, (PSDMax-PSDMin)/dPSD), and PolyOrder
is the order of the nuisance polynomial specified with -polyfit. If this
constraint is not met, you will receive a 'DOF Constraint Violation' Error.

CHOOSING THE SEARCH TERMINATION CRITERIA

The search is terminated when either the maximum number of iterations
has been reached or the maximum search time has been reached. It is
impossible to determine how many iterations to search over because
it is not possible to globally determine what the best schedule is nor
would it be possible to determine how long it would take a random search
to get there.

サーチは繰り返しの最大値に到達した時,あるいは最大のサーチ時間に到達したときに停止する.サーチが終わるまでどのくらい繰り返すかを決定することが不可欠である.なぜならば,何が最適なスケジュールであるかという全体的な決定ができず,目的を達成する(get there)ためのランダムサーチをするためにどのくらいの長さが必要か決定することもできないからである.

That said, there are some rules of thumb that can be followed,
the most basic being that if a 'large' number of schedules have been
searched and the best cost has not changed 'much' in a 'long time', then
you are done.

つまり,以下のような親指(? thumb)のいくつかのルールがある.もっともベーシックなものは,スケジュールの'large'な数をサーチしたとき,最適なコストは'long time'に'much'を変化しない.それゆえ,あなたはそうしたほうが良い.

Of course, you still have to define 'large', 'much', and
'long time'. The summary file can help with this. In particular, there is a
line with the number of iterations since the last substitution (ie,
the number of iterations since one of the best nKeep schedules changed).
This can be used to judge how long a 'long time' is. The same information
can be extracted from the NthIter column of the summary table. At a minimum
let it run for 10000 iterations.

もちろん,あなたは'large' 'much'および'long time'を定義するべきである.summary fileは,これを助ける.特に,最後の代入(substitution,つまり,最適なnKeepスケジュールが変更されてからの繰り返しの数)からの繰り返し数のラインがある.これは,どのくらい長い'long time'が必要かを判定するのに有用である.同じ情報は,要約テーブルのNth Iter(N回目の繰り返し)行から取り出せる.10000回の繰り返しが最小数である.

PARADIGM FILE FORMAT
The schedules will be saved in 'paradigm file' format. This format has four
columns: time, numeric event id, event duration, and event label. A numeric
id of 0 indicates the Null Stimulus.

スケジュールは,'paradigm file'フォーマットに保存される.このフォーマットは,4行からなる.
時間,数値イベントID,イベントの持続時間,イベントラベルである.数値イベントIDの0は,Null刺激を指す.

BUGS

Also see the Optseq Home page at http://surfer.nmr.mgh.harvard.edu/optseq

The vrfavgstd cost function does not work properly if the number of reps
is different for different event types. A prescan window should also be
specified

The ideal counter-balance matrix reported in the summary file will be
for the nominal number of reps when the user has selected to optimize
over the number of reps making comparisons between the actual and
ideal inappropriate (the FOCB error reported for each will be correct
however).

vrfavgstdコスト関数は,異なるイベントタイプで反復回数が異なる場合はうまく働かないことがある.prescan窓も,特定されなくてはならない.

ユーザが実際と理想の間の比較をした繰り返し数の最適を選択した場合,summary fileに報告される 理想のカウンターバランスマトリクスは,名目上の(nominal)繰り返し数である(しかしながら,FOCBエラーは各々が正しいだろうと報告する).

BUG REPORTING

optseq2 is offered with no guarantees and with no obligation or implication
that it will be supported in any way. Having said that, you can send
bug reports/questions to: analysis-bugs@nmr.mgh.harvard.edu. You must
include the following information: (1) optseq2 version, (2) computer
operating system, (3) command-line, (4) description of the problem, and
(5) log and/or summary files.

バグリポートは,analysis-bugs@nmr.mgh.harvard.eduまでだそうですよ.
optseq2のバージョン,コンピュータのOS,コマンドライン,問題の記述,ログと/あるいはsummary filesを添えなくてはならない,とのこと.

AUTHOR

optseq2 was written by Douglas N. Greve in the Summber of '02.

REFERENCES

Dale, A.M., Greve, D.N., and Burock, M.A. (1999) Optimal Stimulus
equences for Event-Related fMRI. 5th International Conference on
Functional Mapping of the Human Brain. Duesseldorf, Germany. June
11-16.

Dale, A.M. (1999). Optimal experimental design for event-related
fMRI. Human Brain Mapping 8:109-114.

拍手[1回]



SUMMARY

optseq2 is a tool for automatically scheduling events for
rapid-presentation event-related (RPER) fMRI experiments (the schedule
is the order and timing of events). Events in RPER are presented
closely enough in time that their hemodynamic responses will
overlap. This requires that the onset times of the events be jittered
in order to remove the overlap from the estimate of the hemodynamic
response. RPER is highly resistant to habituation, expectation, and set
because the subject does not know when the next stimulus will appear
or which stimulus type it will be. RPER is also more efficient than
fixed-interval event related (FIER) because more stimuli can be
presented within a given scanning interval at the cost of assuming
that the overlap in the hemodynamic responses will be linear. In SPM
parlance, RPER is referred to as 'stochastic design'.

optseq2は高速(?rapid)提示する事象関連(RPER)fMRI実験のために,自動的なイベントのスケジューリングを行うためのツールである.スケジュールとは,その順番と事象のタイミングのことを指す.RPERにおける事象は,時間的に十分近接して提示されると,その血流力学 (hemodynamic)の反応はオーバラップするだろう.そこで,事象のオンセット時間がジッタを持つ(血流力学反応の算定から,オーバラップを取り除くために)必要がある.RPERは,habituation, 予期,構えに非常に抵抗する.なぜならば,被験者は,いつ次の刺激が現れるか,どのような刺激のタイプが出てくるかを知らないからである.RPERは,また,固定感覚事象関連(FIER)よりも効果的である.なぜならば,血流力学反応が線形であるとした時のオーバラップの算定のコストにおいて与えられるスキャンインターバル中には,より多くの刺激が提示されなくてはならないからである.SPM特有 (parlance)に,RPERは'stochastic design (確率デザイン)'に関わる.

The flexibility of RPER means that there are a huge number of possible
schedules, and they are not equal. optseq2 randomly samples the space
of possible schedules and returns the 'best' one, where the user can
control the definition of 'best'. Cost functions include: average
efficiency, average variance reduction factor (VRF), and a weighted
combination of average and stddev of the VRF. The user can also
specify that the first order counter-balancing of the sequence of
event-types be pre-optimized.

Visit the Optseq Home Page at:
http://surfer.nmr.mgh.harvard.edu/optseq

COMMAND-LINE ARGUMENTS

--ntp Ntp

Number of time points to be acquired during the scan. This should be
for one 'run' not for the entire session. The Total Scanning Time
is the number of time points times the TR plus the prescan period,
ie, tScanTot = Ntp*TR+tPreScan.
スキャン中に得られるタイムポイントの数.これはひとつの'run'であるべきで,セッション全体ではない.全体のスキャン時間は,時間ポイントの数×TRに,前スキャンの区間を加えたものである.
つまり,tScanTot = Ntp*TR+tPreScan.
…ってことは,Ntpは,もう決まってるのかな?要確認.

--tr TR

Time between functional volumes (in seconds).
これはまあいいよね.

--tprescan tPreScan

Time before the acquisition of the first volume to be processed to
begin stimulation.
これもまあいいよね.

--psdwin PSDMin PSDMax

Specifications for the FIR event response window. It will be assumed that
the entire response can be captured within this window. PSDMin is the
minimum PostStimulus Delay (PSD), PSDMax is the maximum PSD. dPSD
is the sampling interval within the window. dPSD is optional; if
left unset, it will default to the TR. dPSD controls how finely spaced
the event onsets can be scheduled (ie, the onsets will only appear at
integer multiples of the dPSD).


FIR事象反応窓のための特定。これは反応全体が、この窓の中に捕捉されうることが算定されるものである。PSDMinは、最小の刺激後のディレイ(PostStimulus Deley)を、PSDMaxは最大の刺激後のディレイを示す。dPSDは付加的なものである。もし左のビットをオフにする?(left unset)とすれば、それはTRに対するデフォルトになるだろう。dPSDは、どのように良いスペースでイベントのオンセットをスケジュールされうるかを統制する。(つまり、オンセットが、dPSDの整数倍(integer multiples)においてだけ現れるだろう)

--ev label duration nrepetitions

Event Type specification. The label is just a text label (which may be
more informative than a numeric id).

イベントタイプの特定。labelは、単なるテキストラベルである(数字の(numeric)idよりも、情報があるだろう)

Duration is the number of seconds
that the stimulus will be presented; it should be an integer multiple
of the dPSD (see --psdwin).

Durationは、刺激が提示されてからの秒数である。dPSDの整数倍であるべきである。

Nrepetitions is the number of times that
this event type will be presented during the course of the run. The
number of repetitions can be optimized using the --repvar option. Use
a different --ev flag for each event type.
Nrepetitionsは、このイベントタイプがランのコースの間に提示されるだろう回数である。繰り返しの数は、--repvarオプションを用いることで最適化される。異なる--ev flagを、各々のイベントタイプのために用いるべきである。

NOTE: DO NOT INCLUDE THE
NULL STIMULUS AS AN EVENT TYPE.

注意:ひとつのイベントタイプに、空の刺激を含めないこと。

The total stimulation time, tStimTot,
equals the product of the duration and the number of repetitions
summed over all the events. It should be obvious that the total
stimulation time must be less than the total scanning time.

全体の刺激時間、tStimTotは、持続時間と繰り返しの数の構成を、すべてのイベントを通して加算したものに等しい。これは、すべてのスキャン時間よりもすべての刺激時間が小さくなるように示すべきである。

--repvar pct

Allow the number of repetitions of each event type to randomly vary by
+/- pct percent from the number specified with --ev. This allows the
user to optimize over the number of repetitions. The total stimulation
time is computed from the maximum possible number of repetitions. If
only the percentage is given, then the relative number of repetitions
of each event type will stay constant. If the string 'per-evt' is
appended, then the number of reps for each event type can change
independently to each other.


各々のイベントの繰り返しの認められる回数は、--evによって特定された数からの+/- pct(パーセント)である。すべての刺激時間は、繰り返しのありうる最大値から計算される。もし、パーセンテージだけが与えられている場合は、各々のイベントタイプのそれぞれの繰り返しの数は、コンスタントに与えられる。もし、文字列'per-evt'が付加されれば、各々のイベントタイプの繰り返しの数は、お互いに独立に変化する。

--polyfit order

Add polynomial regressors as nuisance variables. Order N includes the
Nth order polynomial was well as all lower orders. Max order is currently
2. Order 0 is a baseline offset; Order 1 is a linear trend; Order 2
is a quadradic trend. Cost functions will not explicitly include the
nuisance variables.


妨害(nuisance)変数としての、多項式(polynomial)の独立変数(regressor).次数(order)Nは、すべての低次と同等のN次の多項式である。最大の次数は、一般に2である。次数0は、オフセットのベースラインである。次数1は、線形の傾き(linear trend)である。次数2は、二次の傾きである。コスト関数は、妨害変数にexplicitly(明白には?)含まれない。

--tnullmin tNullMin

Force the NULL stimulus to be at least tNullMin sec between stimuli.
Note that this means that the stimulus duration + tNullMin must be
an integer multiple of the dPSD.

刺激間に、少なくともtNullmin秒の空刺激を強制する。刺激の持続時間+tNullMinは、dPSDの整数倍でなくてはならないことを意味する。

--tnullmax tNullMax

Limit the maximum duration of the NULL stimulus to be tNullMax sec.
Note: it may not be possible for a given parameter set to keep the NULL
stimulus below a certain amount. In this case, the following error
message will be printed out 'ERROR: could not enforce tNullMax'. By
default, tNullMax is infinite.

NULL刺激の最大の持続時間の限界は、tNullMax秒である。
 注意:これはNULL刺激が、確かな量(certain amouont)以下であるときにこのパラメータが与えられることはない。この場合、次のエラーメッセージがプリントアウトされる。
'ERROR: tNullMazが実施できません'
デフォルトでは、tNullMaxは無限長である。

--nsearch Nsearch

Search over Nsearch iterations. optseq will randomly construct Nsearch
schedules, compute the cost of each one, and keep the ones with the
highest cost. It is not permitted to specify both Nsearch and Tsearch.

Nsearch 繰り返しをサーチする。optseqは、ランダムにNsearchスケジュールを構成し、各々のコストを計算し、もっとも高いコストであるものを保持する。NsearchとTsearchの両方と特定することは認められない。

--tsearch Tsearch

Search for Tsearch hours. optseq will randomly construct as many
schedules schedules as it can in the given time, compute the cost of
each one, and keep the ones with the highest cost. It is not
permitted to specify both Nsearch and Tsearch.

Tsearch時間をサーチする。(以下同じ)

--focb nCB1Opt

Pre-optimize the first order counter-balancing (FOCB) of the event
sequence. This will cause optseq2 to construct nCB1Opt random
sequences and keep the one with the best FOCB properties. This will be
done for each iteration. Counter balance optimization is not allowed
when there is only one event type.

イベントシークエンスの前最適化された1次のカウンターバランス(FOCB) 。これにより、optseq2がnCB10ptランダムシークエンスを構成し、元もよいFOCBプロパティのひとつを保持することが起こる。これは、各々の繰り返しを行う。カウンターバランス最適化は、ひとつのイベントタイプしかないときには認められない。

--ar1 rho

Optimize while whitening with an AR(1) model with parameter rho. rho must
be between -1 and +1.

パラメータrho(ρ?)のAR(1)モデルを持つホワイトニングを最適化する.rhoは,−1から1の間でなくてはならない.

--pen alpha T dtmin

Penalize for one presentation starting too soon after the previous
presentation. The weight is computed as 1 - alpha*exp(-(dt+dtmin)/T), where
dt is the time from the offset of the previous stimulus to the onset
of the next stimulus. The basic idea here is that the second stimulus
will be reduced in amplitude by the weight factor. alpha and T were fit
from data presented in Huettel and McCarthy (NI, 2000) to be alpha=0.8
and T = 2.2 sec.

前の提示の後,ひとつの提示が始まるのが早すぎることに対する罰(penalize).重み付けは,1−alpha*exp(-(dt + dtmin)/T)として計算され,dtは前の刺激のオフセットからの時間から,次の刺激のオンセットの時間を指す.基本的なアイデアは,二番目の刺激が重み付け要素(weight factor)によって強度(amplitude)においては減少されるであろうということである.alphaとTは,Huettel and McCarthy (NI, 2000)に提示されたデータに合わせてあり,alpha = 0.8, T = 2,2secである.

--evc C1 C2 ... CN

Optimize based on a contrast of the event types. Ci is the contrast
weight for event type i. There must be as many weights as event types.
Weights are NOT renormalized such that the sum to 1.

イベントタイプの対比をベースにした最適化.Ciは,イベントタイプiの対照的な重み付けである.イベントタイプとしての多くの重み付けがなくてはならない.重み付けは,合計として1となるような再標準化 (renormalized)はされない.

--cost costname

Specify cost function. Legal values are eff, vrfavg,
vrfavgstd. Default is eff. params as any parameters which accompany
the given cost function. eff is the cost function which maximizes
efficiency (no parameters). vrfavg is the cost function which
maximizes the average Variance Reduction Factor (VRF) (no
parameters). vrfavgstd maximizes a weighted combination of the average
and stddev VRF; there is one parameter, the weight give to the stddev
component.

特定のコスト関数.合法な(Legal)値は,eff, vrfavg, vrfavgstdである.デフォルトは,与えられたコスト関数に一致するいくつかのパラメータとしてのeff.paramsである.effは,最大の効率(パラメータがない)コスト関数である.vrfavgは,平均の分散(variance)減少要素 (VRF)(パラメータがない)を最大化したコスト関数である.vfravgstdは,平均と標準偏差VRFの重み付けの組み合わせを最大化する.一つのパラメータがあり,重み付けは標準偏差構成要素を与える.
--sumdelays

Sum the delay regression parameters when computing contrast matrix.
The event contrast (--evc) specifies how to weight the events when
forming the contrast vector. However, there are multiple coefficients
per event type corresponding to the delay in the FIR window. By default,
a separate row in the contrast matrix is provided for each delay. To
sum across the delays instead, use --sumdelays. The contrast matrix
will have only one row in this case.

コントラストマトリクスを計算したとき,遅延回帰(regression)パラメータを合計する.イベントのコントラスト(--evc)は,コントラストベクトルが形成されるとき,イベントをどのように重み付けするかを特定する.しかしながら,複数の係数(coefficients)が,イベントタイプ毎にあるとき,FIRウインドウにおける遅延と一致する.デフォルトでは,コントラスト魔と陸における分割された列(row)は,各々のデ遅延がされるコントラストマトリクスである.遅延間で加算したいときは,--sumdelaysを用いなさい.コントラストマトリクスは,この場合ひとつの列だけに現れる.

--seed seedval

Initialize the random number generator to seedval. If no seedval is
specified, then one will be picked based on the time of day. optseq2
uses drand48().

seedvalの乱数生成を初期化する.もし,seedvalが特定されなければ,その日の時間をベースに取り上げられる.optseq2は,drand48()を用いる.

--pctupdate pct

Print an update line to stdout and the log file after completing each
pct percent of the search.

stdoutのラインのアップデート,各々のpctサーチのパーセントが完了したあとのログファイルをプリントする.

--nkeep nKeep

Save nKeep of the best schedules. Increasing this number does not
substantially increase the search time, so it is a good idea to
specify more than you think you will need.

最も良いスケジュールのnKeepを保存する.この数が増加する事は,サーチタイムの増加を実質的には増大させず,あなたがそうしたいと思っているよりも多く設定する事が良いアイデアである.

--o outstem

Save schedules in outstem-RRR.par, where RRR is the 3-digit
zero-padded schedule rank number (there will be nKeep of them).
The schedules will be saved in the Paradigm File Format (see below).

RRRは3個の数字(zero-padded, 0から増えるということか)のスケジュールで並んだ数である.

--mtx mtxstem

Save the FIR design matrices to mtxstem_RRR.mat in Matlab 4 binary
format.

FIRデザインマトリクスをMatlab 4 binary formatで保存する.

--cmtx cmtxfile

Save the contrast matrix in Matlab 4 binary format.

コントラストマトリクスをMatlab 4 binary formatで保存する.

--sum summaryfile

optseq2 will create a file which summarizes the search, including
all the input parameters as well as characteristics of each of
the schedules kept. By default, the summary file will be outstem.sum,
but it can be specified explicitly using this flag. See THE SUMMARY
FILE below.

optseq2は,サーチの要約のファイルを作成し,それは全ての入力パラメータを,各々のスケジュールの特徴が維持されているのと同様に含んでいる.デフォルトでは,summary fileは,outstem.sumだが,これは明白なこのフラグを用いて特定化されうる.下記のSUMMARY FILEを見よ.

--log logfile

During the course of the search, optseq2 will print information about
the current search status to stdio and to the log file. By default
the log file will be outstem.log. The log file will contain a summary
of input arguments as well as a series of status lines. A status line
will be printed each time there is a change in the list of nKeep best
schedules as well as at prespecified regular intervals. By default,
the interval is 10% of the search time, but this can be changed
with --pctupdate. Each status line has 12 columns: (1) percent complete,
(2) iteration number, (3) minutes since start, (4) best cost,
(5) efficiency, (6) CB1Error, (7) vrfavg, (8) vrfstd, (9) vrfmin,
(10) vrfmax, (11) vrfrange, and (12) number of iterations since
last substitution.

サーチのコースの間,optseq2は,現在のサーチステータス情報について,stdioおよびlog fileにプリントする.log fileは,outstem.logである.これは,入力変数とステータスラインのシリーズの要約を含む.ステータスラインは,前特定された通常の間隔と,nKeepの最良のスケジュールのリストにおいて変化があるときにプリントされる.デフォルトでは,サーチタイムの10%の間隔があるときで,これは--pctupdateで変化させられる.各々のステータスラインは12行である.
1.完遂率
2.反復数
3.開始時間(分)
4.最良のコスト
5.効率性
6.CB1Error
7.vrfavg
8.vrfstd
9.vrfmin
10.vrfmax
11.vrfrange
12.最後の置き換えからの反復数.

--pctupdate pct

Print a search status to stdio and the log file at regular intervals
corresponding to pct percent of the search time. Default is 10%.

--sviter SvIterFile

Save information summary about all the schedules to SvIterFile in
ASCII format. Each line will have 7 columns corresponding to:
(1) cost, (2) efficiency, (3) cb1err, (4) vrfavg, (5) vrfstd,
(6) vrfmin, (7) vrfmax. This is mainly for exploring the distribution
of the various costs. WARNING: this file can grow to be very large.

ASCIIフォーマットでScIterFileのスケジュールの全ての要約情報を保存する.
7行で構成され,
1.コスト
2.効率性
3.CB1Error
4.vrfavg
5.vrfstd
6.vrfmin
7.vrfmax
である.
警告:このファイルは大変大きい.

--i instem

Load all input schedules that match instem-RRR.par. These can be used
to initialize the search (for example, if you want to continue a
previous optimization). It is also possible to only generate a summary
and/or design matrices of the given input schedules by include the
--nosearch flag. This can be useful for testing schedules that were
optimized under one cost function against another cost function or
for testing independently generated schedules. See also --in.

instem-RRR.parに一致する,全ての入力スケジュールをロードする.これらは,サーチの初期化に用いられる(たとえば,もしあなたが前の最適化を継続したいとして).
--nosearchフラグを追加することで,これは要約と/あるいは与えられた入力スケジュールのデザインマトリクスだけを生成することも可能である.これは,あるコスト関数下での最適化のテストスケジュールと,他のコストファンクション,あるいはテスト独立にスケジュールを生成するときに有益になるだろう.
--inも見よ.

--in input-schedule <--in input-schedule >

This does the same thing as --i except that each file is specified
separately.
--iと一緒.

--nosearch

Do not search for optimal schedules. This can only be used when
reading schedules in using --i or --in. See --i for more information.
上に書きましたね.--i, --inを使うときに,サーチをしないということのよう.

長くなったので分割します.

拍手[0回]



忍者ブログ [PR]
カレンダー
02 2024/03 04
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
メールはこちらから
プロフィール
HN:
渡辺隼人
性別:
男性
ブログ内検索
カウンター
コガネモチ