<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Ens_catalog.m</id>
	<title>Ens catalog.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Ens_catalog.m"/>
	<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Ens_catalog.m&amp;action=history"/>
	<updated>2026-12-05T17:42:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.15</generator>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Ens_catalog.m&amp;diff=10214&amp;oldid=prev</id>
		<title>Kuprov: version fragment to 2.13 per IK 2026-08-30</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Ens_catalog.m&amp;diff=10214&amp;oldid=prev"/>
		<updated>2026-08-30T09:11:24Z</updated>

		<summary type="html">&lt;p&gt;version fragment to 2.13 per IK 2026-08-30&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:11, 30 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[optimcon.m]], [[ensemble.m]], [[drifts.m]], [[Optimal control module]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[optimcon.m]], [[ensemble.m]], [[drifts.m]], [[Optimal control module]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;Version 2.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/del&gt;, authors: [[Ilya Kuprov]]&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;Version 2.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;13&lt;/ins&gt;, authors: [[Ilya Kuprov]]&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Ens_catalog.m&amp;diff=10087&amp;oldid=prev</id>
		<title>Kuprov: new page for Spinach main f053e432: documents ens_catalog.m from the source header and implementation</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Ens_catalog.m&amp;diff=10087&amp;oldid=prev"/>
		<updated>2026-08-30T08:02:56Z</updated>

		<summary type="html">&lt;p&gt;new page for Spinach main f053e432: documents ens_catalog.m from the source header and implementation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:ens_catalog.m}} __NOTOC__&lt;br /&gt;
Ensemble case catalog for optimal control problems. Enumerates the Cartesian product of the state-target pairs, the drift generators, the control power levels, the resonance offsets, the phase cycle lines, and the distortion functions; then applies the ensemble correlation filters and the ensemble budget. Each row of the catalog is one ensemble case to be simulated at each evaluation of the control sequence fidelity. The six grid dimensions are taken from the number of elements of control.rho_init, from control.ndrifts, from the number of elements of control.pwr_levels, from the product of the numbers of elements of the cells of control.offsets (one if that cell array is empty), from the number of rows of control.phase_cycle, and from the number of rows of control.distortion. The product is built by repeated Kronecker expansion, so the state-target pair index runs fastest and the distortion index runs slowest.&lt;br /&gt;
&lt;br /&gt;
The entries of control.ens_corrs are then applied as filters. With &amp;#039;rho_ens&amp;#039;, the state-target pair column is dropped, the remaining five columns are reduced with unique(...,&amp;#039;rows&amp;#039;,&amp;#039;stable&amp;#039;), and the surviving rows are numbered consecutively in that order to give the new state-target pair column; the pairing of user-supplied state-target pairs to ensemble members therefore follows the order in which the distinct five-column combinations first appear in the catalog. With &amp;#039;rho_drift&amp;#039;, only the rows in which the state-target pair index equals the drift index are kept. With &amp;#039;power_drift&amp;#039;, only the rows in which the power level index equals the drift index are kept.&lt;br /&gt;
&lt;br /&gt;
The ensemble budget in control.budget is applied last. A finite budget that is not greater than one is a fraction of the case count: the number of cases retained is round(n_cases*control.budget), floored at one. Any larger budget is an absolute case count. When the resulting number is smaller than the number of catalog rows, a random subset of the rows is drawn; the random number generator is set to the Mersenne twister with seed 5318008 for the draw and its previous state is restored afterwards, so the subset is the same on every run.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
     [catalog,ens_sizes]=ens_catalog(control)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
     control    - control data structure produced by optimcon.m&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
     catalog    - [n_cases x 6] array of ensemble indices; the col-&lt;br /&gt;
                  umns index the state-target pair, the drift gene-&lt;br /&gt;
                  rator, the power level, the offset combination,&lt;br /&gt;
                  the phase cycle line, and the distortion function&lt;br /&gt;
 &lt;br /&gt;
     ens_sizes  - [1 x 6] array of the ensemble dimension sizes the&lt;br /&gt;
                  catalog was built from, in the same column order&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
ens_sizes reports the dimensions of the full Cartesian grid, before the correlation filters and the budget are applied; the number of rows of catalog is in general smaller than the product of those dimensions.&lt;br /&gt;
&lt;br /&gt;
The function requires control to be a structure carrying the rho_init, ndrifts, pwr_levels, offsets, phase_cycle, distortion, ens_corrs, and budget fields.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[optimcon.m]], [[ensemble.m]], [[drifts.m]], [[Optimal control module]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Version 2.11, authors: [[Ilya Kuprov]]&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
</feed>