Changeset 1094 for trunk/src/uvmat.m
- Timestamp:
- Mar 25, 2021, 9:37:04 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r1093 r1094 1538 1538 XmlData.LIFCalib.Ray1Coord=LineData{1}.Coord; 1539 1539 XmlData.LIFCalib.Ray2Coord=LineData{2}.Coord; 1540 if numel(LineData)<3 1541 msgbox_uvmat('ERROR','draw a reference line of direct laser illumination (without dye absorbsion)'); 1542 return 1543 end 1540 1544 XmlData.LIFCalib.RefLineCoord=LineData{3}.Coord; 1541 1545 … … 1545 1549 y=linspace(UvData.Field.Coord_y(1),UvData.Field.Coord_y(2),nby)-nby/2; 1546 1550 [X,Y]=meshgrid(x,y); 1547 coeff_quad=0.15*4/(nbx*nbx);% image luminosity reduced by 10% at the edge1548 UvData.Field.A=double(UvData.Field.A).*(1+coeff_quad*(X.*X+Y.*Y));1551 %coeff_quad=0.15*4/(nbx*nbx);% image luminosity reduced by 10% at the edge 1552 %UvData.Field.A=double(UvData.Field.A).*(1+coeff_quad*(X.*X+Y.*Y)); 1549 1553 1550 1554 %% display the current image in polar axes with origin at the illumination source … … 1564 1568 y_ref=y_ref-y0; 1565 1569 [theta_ref,r_ref] = cart2pol(x_ref,y_ref);%theta_ref and r_ref are the polar coordinates of the points on the line 1566 theta_ref=theta_ref*180/pi;% theta_ref in radians1570 theta_ref=theta_ref*180/pi;% theta_ref in degrees 1567 1571 figure(10) 1568 1572 plot(theta_ref,r_ref) … … 1570 1574 ylabel('radius from light source') 1571 1575 title('ref line in polar coordinates') 1572 azimuth_ima=linspace(DataPol.Coord_y(1),DataPol.Coord_y(2),size(DataPol.A,1)) ;%array of angular indexon the transformed image1576 azimuth_ima=linspace(DataPol.Coord_y(1),DataPol.Coord_y(2),size(DataPol.A,1))-360;%array of angular indices on the transformed image 1573 1577 dist_source = interp1(theta_ref,r_ref,azimuth_ima);% get the polar position of the reference line 1574 1578 dist_source_pixel=round(size(DataPol.A,2)*(dist_source-DataPol.Coord_x(1))/(DataPol.Coord_x(2)-DataPol.Coord_x(1))); … … 3719 3723 %% choose and read a second field FileName_1 if defined 3720 3724 ParamOut_1=[]; 3721 if numel(UvData.FileInfo)>1 3725 if ~isempty(FileName_1) 3726 if numel(UvData.FileInfo)==1 3727 UvData.FileInfo{2}=UvData.FileInfo{1}; 3728 end 3722 3729 VelType_1=[];%default 3723 3730 FieldName_1=[]; … … 3736 3743 NomType_1=get(handles.NomType,'String'); 3737 3744 end 3738 if strcmp(UvData.FileInfo{2}.Fi eldType,'image')3745 if strcmp(UvData.FileInfo{2}.FileType,'image') 3739 3746 FieldName_1='image'; 3740 3747 frame_index_1=1;%default … … 3761 3768 end 3762 3769 switch UvData.FileInfo{2}.FileType 3763 case {'civx','civdata','netcdf','pivdata_fluidimage'} ;3770 case {'civx','civdata','netcdf','pivdata_fluidimage'} 3764 3771 list_fields=get(handles.FieldName_1,'String');% list menu fields 3765 3772 FieldName_1= list_fields{get(handles.FieldName_1,'Value')}; % selected field … … 3849 3856 %% update the display menu for the second velocity type (second menuline) 3850 3857 test_veltype_1=0; 3851 if isempty(FileName_1)3852 elseif ~test_keepdata_1 3853 if strcmp(UvData.FileInfo{2}.Fi eldType,'civdata')&& ~strcmp(FieldName_1,'get_field...')3858 if ~isempty(FileName_1) 3859 3860 if strcmp(UvData.FileInfo{2}.FileType,'civdata')&& ~strcmp(FieldName_1,'get_field...') 3854 3861 test_veltype_1=1; 3855 3862 set(handles.VelType_1,'Visible','on')
Note: See TracChangeset
for help on using the changeset viewer.