D3DEnergetic / d3d-fidasim

DIII-D routines for running FIDASIM
MIT License
1 stars 0 forks source link

Old oblique spatial calibrations #3

Open lstagner opened 8 years ago

lstagner commented 8 years ago

The spatial calibrations for the oblique system hasn't been updated since 2012.

@camicollins has the spatial calibration changed since then?

camicollins commented 8 years ago

@lstagner Thanks for asking about this. Yes it has changed. I'm trying to figure out the best way to format the spatial calibration data to make it easy for you, so I will describe what I have stored and maybe you can advise if you need it changed. I have the spatial calibration for all 33 of the available fibers, however, some of the chords only use 1 fiber instead of 3 at each radius.

Shots 148702-162176 use 'forward2012' spatial calibration data, and shots 162177-present uses 'forward2015'. The new 'forward2015' setup is on this webpage: https://diii-d.gat.com/diii-d/2015_FIDA_Patch_settings It looks like this: screen shot 2016-05-05 at 7 20 20 pm The chords that are in red are the ones that only use 1 fiber. The ones in green use 3 fibers. The ones in purple are for the fast-FIDA system (bandpass filter+ PMT data, not spectral). There are 3 vertical channels, 'V1,V2,V3' that look at 330LT beam, and the rest look at 210RT.

The spatial calibration data for each chord is returned in the data routines, but is stored at: /e/alfven/fida/calib/patch/forward2015/PATCH13.dat

This contains the structure 'patchdat', where the x,y,r,phi for each fiber are under patchdat.chordname.fibers. This structure only contains data for the fibers that are actually used (doesn't store all 33 available fibers). In the cases where 3 fibers per channel are used, the spatial data is an array

IDL> help,patchdat.f03_c2.fibers
** Structure <1a85c448>, 5 tags, length=56, data length=54, refs=2:
   FIBERS          INT       Array[3]
   X               FLOAT     Array[3]
   Y               FLOAT     Array[3]
   R               FLOAT     Array[3]
   PHI             FLOAT     Array[3]

In the cases where only one fiber is used, it looks like this:

IDL> help,patchdat.f09.fibers
** Structure <1a560c08>, 5 tags, length=20, data length=18, refs=2:
   FIBERS          INT             20
   X               FLOAT          -128.549
   Y               FLOAT          -151.427
   R               FLOAT           198.633
   PHI             FLOAT           220.329

I can supply the cal data for all 33 fibers, however, we need to keep track of exactly which fibers are used when comparing FIDASIM results to experiment.

lstagner commented 8 years ago

@camicollins

Thanks for this. Do you also have the spot_size radius [cm] for each fiber? FIDASIM can handle finite LOS volumes now and it would be a good idea to use that functionality for the OBLIQUE system.

For the moment I am not worried about knowing which fiber is active or not. That is something that best handled as a post-processing step. I can see writing a function like

apply_patch("forward2016","fidasim_spectra.h5")

That automatically takes care of everything.

Last I heard Bill is looking for an undergraduate to clean up all the FIDA analysis routines. Whenever they start working I will help them better integrate FIDASIM with the data collection side of things. Also have them translate prefida into python for me to better integrate into OMFIT :smile:

camicollins commented 8 years ago

@lstagner Unfortunately it's not straightforward to give you a measured radius for each fiber. The spatial calibration equipment that we use is borrowed from CER and the targets are designed to be mounted in the r-z plane. The oblique spots that are measured end up being ovals, not circles. If you want to be precise, someone would need to go back to the pieces of paper with all of the traced ovals and get the detailed measurements of the major/minor radii and maybe the rotation angle, though probably that doesn't matter since we'd just be trying to figure out the circle radius. Maybe all you need is the minor radius of the oval? The spot size depends on the R,Z,phi positions because the viewchord diverges.

Let me know if you want to proceed with getting precise spot sizes.

lstagner commented 8 years ago

I am going to take a crack at this today. I am going to use all 33 fibers. BTW do you have a preferred name for each fiber? If not I am just going to use P1a,P1b and so on. In regards to how the fibers are combined in the experiment, I think a good approach is to make a sort of configuration file something like

{
    "f03_c4":["P1a", "P1b", "P1c"],
    "f03_c2":["P2a" ,"P2b", "P2c"],
    "f10":["P3b"]
     ⋮
}

that fully specifies which fiber goes with each pointname. We then write a function that takes a FIDASIM run and this config file and returns the combined spectra.

camicollins commented 8 years ago

Are you going to use spatial calibration data from /e/alfven/fida/calib/patch/forward2015/PATCH13.dat patchdat.(chordname).fibers

? If so I need to change it to contain spatial data from all 33 fibers.

lstagner commented 8 years ago

Yes, that was where I was going to look for it.

On Mon, May 16, 2016 at 8:59 AM, camicollins notifications@github.com wrote:

Are you going to use spatial calibration data from /e/alfven/fida/calib/patch/forward2015/PATCH13.dat patchdat.(chordname).fibers

? If so I need to change it to contain spatial data from all 33 fibers.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/D3DEnergetic/d3d-fidasim/issues/3#issuecomment-219464629

camicollins commented 8 years ago

OK it's updated now to contain spatial calibration data for all 33 fibers, but now has an extra structure addition under patchdat.fibers_used to specify which fiber was actually used. The fibers are just labeled by number 1-33 (so patchdat.f03_c4.fibers_used = [1,2,3], consistent with the labeling on the webpage).

So everything you need should be in this single file: IDL>RESTORE,'/e/alfven/fida/calib/patch/forward2015/PATCH13.dat' IDL> help,patchdat.f09 \ Structure <173d2f88>, 7 tags, length=96, data length=88, refs=2: X FLOAT -128.549 Y FLOAT -151.427 R FLOAT 198.633 PHI FLOAT 220.329 FIBERS_USED INT 20 FIBERS STRUCT -> Array[1] UNITS STRING 'cm and degrees'

So this means that chord 'f09' used fiber #20, and the x,y,r,phi data listed is for that fiber. You can use patchdat.f09.fibers to get spatial data for all 3 fibers.

lstagner commented 8 years ago

Has the mirror/lens location changed significantly? I need two points to define a fiber.

camicollins commented 8 years ago

No, mirror/lens location hasn't changed.