"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/Transform/Proj4/t/proj_transform.t" between
PDL-2.077.tar.gz and PDL-2.078.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

proj_transform.t  (PDL-2.077):proj_transform.t  (PDL-2.078)
skipping to change at line 40 skipping to change at line 40
ok defined graticule(10,2)->glue(1,earth_coast()); ok defined graticule(10,2)->glue(1,earth_coast());
my $map = eval { earth_image( 'day' ) }; my $map = eval { earth_image( 'day' ) };
SKIP: { SKIP: {
skip("earth_image() can not load test data", 23) if $@; skip("earth_image() can not load test data", 23) if $@;
pass("earth_image() loaded"); pass("earth_image() loaded");
$map->badflag(1); $map->badflag(1);
my $checksum = unpack "%16C*", ${$map->get_dataref}; my $checksum = unpack "%16C*", ${$map->get_dataref};
my $goodcheck = 56639; my $goodcheck = 56639;
if ($checksum != $goodcheck) { skip "earth_image() map has bad checksum: $checksum (expected $goodcheck)", 2
skip "earth_image() map has bad checksum: $checksum (expected $goodcheck)" 2
, 22; if $checksum != $goodcheck;
}
my $got = t_raster2float()->apply($map->mv(2,0));
$got = $got->slice(':,500:501,200:201');
ok all(approx $got, pdl(float, <<'EOF'), 1e-5), 't_raster2float' or diag 'got
: ', $got;
[
[
[ -1.60686 -0.956604 0.00784314 0.0705882 0.305882]
[ -1.60379 -0.956604 0.00784314 0.0705882 0.305882]
]
[
[ -1.60686 -0.953533 0.00784314 0.0705882 0.305882]
[ -1.60379 -0.953533 0.00784314 0.0705882 0.305882]
]
]
EOF
my $shape = earth_shape();
$got = t_raster2float()->apply($shape->mv(2,0));
my $lonlatradius = $got->slice('0:2'); # r g b all same
$lonlatradius->slice('(2)') *= float((6377.09863 - 6370.69873) / 6371);
$lonlatradius->slice('(2)') += float(6370.69873 / 6371);
$got = $lonlatradius->slice(':,500:501,200:201');
ok all(approx $got, pdl(float, <<'EOF'), 1e-5), 'earth_shape' or diag 'got: '
, $got;
[
[
[ -1.60686 -0.956604 0.999953]
[ -1.60379 -0.956604 0.999953]
]
[
[ -1.60686 -0.953533 0.999953]
[ -1.60379 -0.953533 0.999953]
]
]
EOF
my $map_size = [500,500]; my $map_size = [500,500];
my @slices = ( my @slices = (
"245:254,68:77,(0)", "245:254,68:77,(0)",
"128:137,272:281,(0)", "128:137,272:281,(0)",
"245:254,262:271,(0)", "245:254,262:271,(0)",
"390:399,245:254,(0)", "390:399,245:254,(0)",
"271:280,464:473,(0)" "271:280,464:473,(0)"
); );
 End of changes. 1 change blocks. 
4 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)