Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: [10GMMF] Modelling Ad Hoc - task 1 - fiber model



Contact info: (note the spam trap on the email address)

Lars E. Thon
Aeluros Inc.
201 San Antonio Circle, Suite 172
Mountain View, CA 94040-1254
T. 650-917-4113 (direct)
T. 650-917-7394 (fax)
E. lars@x_aeluros_x.com

I also wanted to get the ball rolling on discussing data exchange
formats, etc.

I often find that when working on data from various sources, I spend too
much time transforming the data from whatever source form (excel,
text/ascii, matlab, oscilloscope files, ....) into a database that is
handy to use both as the source of simulations and a reference of the
data collected.

What usually happens is that I end up creating a matlab dataset (.mat)
binary file) with each measurement or simulation result stored in a
structure, and all the structures collected together in an indexable
cell array.

To give an idea of what I'm talking about, here is an example of a
structure that might be useful for exchanging fiber/launch/mode data:

s{k}.fname          %original filename (if applicable)
s{k}.description    %descriptive string (if applicable)
s{k}.length         %fiber length
s{k}.radius         %fiber core radius
s{k}.nprofile       %2 columns of index profile radius/nvalue
s{k}.launchsize     %e.g. 7e-6 (7um) FWHM (aka. pw50)
s{k}.launchoffset   %e.g. 20e-6 (20um)
s{k}.centerdip      %indicate center dip type and/or value
s{k}.edgedip        %indicate edge   dip type and/or value
s{k}.alpha1         %indicate inner alpha type and/or value(s)
s{k}.alpha2         %indicate outer alpha type and/or value(s)
s{k}.hmode          %3 columns of modenumber/modedelay/modepower
                     %(units??)
s{k}.Hmode          %3 columns of freq/mag/phase

A typical usage pattern would be:

s= load('CamMMF.81fibers.mat'); % contains 195 fiber/launch records
s= s.s;
for k= 1:length(s)
     hmode= s{k}.hmode;
     %do some per-fiber/launch calculations
     %etc
     %etc
end

The above is of course only a suggestion to illustrate what might be a
handy way of packaging the data for ease of use and reference. Note also
that space can be saved by converting the data to single() format when
packing it into the structure, for example

s{k}.hmode= single(hmode);

Note: In matlab version 7 (arriving any day now), there is better
support for single precision variables and calculations, and some of the
drudgery of converting the data for packing may possibly be avoided.

I realize this is a matlab-centric view of the world, but quite a bit of
the back-end simulation work will likely be taking place in matlab.
Others may have opinions on the need for, and structure of, spreadsheet
data formats, for example.

I'll be happy to assist in converting text data (say, Cambridge model
data, which possibly is native in text format from a standalone
application, I do not know with certainty) to a common matlab database
form.

--
----
Lars E. Thon <lars@aeluros.com>
Aeluros Inc., 201 San Antonio Circle, Suite 172
Mountain View, CA 94040-1254
650-917-4113(w) 650-917-7394(f) 650-968-8042(h) 408-439-5914(c)