/usr/share/doc/python-epr/html/reference.html is in python-epr-doc 0.9.3-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>API Reference — PyEPR 0.9.3.dev0 documentation</title>
<link rel="stylesheet" href="_static/pydoctheme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.9.3.dev0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/sidebar.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Change history" href="NEWS.html" />
<link rel="prev" title="GDAL export example" href="gdal_export_example.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="NEWS.html" title="Change history"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="gdal_export_example.html" title="GDAL export example"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PyEPR 0.9.3.dev0 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-epr">
<span id="api-reference"></span><h1>API Reference<a class="headerlink" href="#module-epr" title="Permalink to this headline">¶</a></h1>
<p id="index-0"><a class="reference external" href="https://github.com/avalentino/pyepr">PyEPR</a> provides <a class="reference external" href="https://www.python.org">Python</a> bindings for the ENVISAT Product Reader C API
(<a class="reference external" href="https://github.com/bcdev/epr-api">EPR API</a>) for reading satellite data from <a class="reference external" href="https://envisat.esa.int">ENVISAT</a> <a class="reference external" href="https://earth.esa.int">ESA</a> (European
Space Agency) mission.</p>
<p><a class="reference external" href="https://github.com/avalentino/pyepr">PyEPR</a> is fully object oriented and, as well as the <a class="reference external" href="https://github.com/bcdev/epr-api">EPR API</a> for C,
supports <a class="reference external" href="https://envisat.esa.int">ENVISAT</a> MERIS, AATSR Level 1B and Level 2 and also ASAR data
products. It provides access to the data either on a geophysical
(decoded, ready-to-use pixel samples) or on a raw data layer.
The raw data access makes it possible to read any data field contained
in a product file.</p>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<div class="section" id="product">
<h3>Product<a class="headerlink" href="#product" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Product">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Product</code><a class="headerlink" href="#epr.Product" title="Permalink to this definition">¶</a></dt>
<dd><p>ENVISAT product</p>
<p>The Product class provides methods and properties to get information
about an ENVISAT product file.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.open" title="epr.open"><code class="xref py py-func docutils literal"><span class="pre">open()</span></code></a></p>
</div>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Product.file_path">
<code class="descname">file_path</code><a class="headerlink" href="#epr.Product.file_path" title="Permalink to this definition">¶</a></dt>
<dd><p>The file’s path including the file name</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Product.mode">
<code class="descname">mode</code><a class="headerlink" href="#epr.Product.mode" title="Permalink to this definition">¶</a></dt>
<dd><p>String that specifies the mode in which the file is opened</p>
<p>Possible values: <cite>rb</cite> for read-only mode, <cite>rb+</cite> for read-write mode.</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Product.id_string">
<code class="descname">id_string</code><a class="headerlink" href="#epr.Product.id_string" title="Permalink to this definition">¶</a></dt>
<dd><p>The product identifier string obtained from the MPH parameter ‘PRODUCT’</p>
<p>The first 10 characters of this string identify the product type,
e.g. “MER_1P__FR” for a MERIS Level 1b full resolution product.
The rest of the string decodes product instance properties.</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Product.meris_iodd_version">
<code class="descname">meris_iodd_version</code><a class="headerlink" href="#epr.Product.meris_iodd_version" title="Permalink to this definition">¶</a></dt>
<dd><p>For MERIS L1b and RR and FR to provide backward compatibility</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Product.tot_size">
<code class="descname">tot_size</code><a class="headerlink" href="#epr.Product.tot_size" title="Permalink to this definition">¶</a></dt>
<dd><p>The total size in bytes of the product file</p>
</dd></dl>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="epr.Product.get_band">
<code class="descname">get_band</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_band" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the band corresponding to the specified name.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – the name of the band</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> instance, or raises a
<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a> if not found</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_band_at">
<code class="descname">get_band_at</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_band_at" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> at the specified position within the
<code class="xref py py-class docutils literal"><span class="pre">product</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – the index identifying the position of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a>, starting
with 0, must not be negative</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> instance, or raises a
<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a> if not found</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_dataset">
<code class="descname">get_dataset</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_dataset" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> corresponding to the specified dataset name</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> name</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> instance</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_dataset_at">
<code class="descname">get_dataset_at</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_dataset_at" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> at the specified position within the
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – the index identifying the position of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a>,
starting with 0, must not be negative</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_dsd_at">
<code class="descname">get_dsd_at</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_dsd_at" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> at the specified position</p>
<p>Gets the <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> (<a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> descriptor) at the specified
position within the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – the index identifying the position of the <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a>,
starting with 0, must not be negative</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> instance</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_num_bands">
<code class="descname">get_num_bands</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_num_bands" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of all <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a>s contained in a <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_num_datasets">
<code class="descname">get_num_datasets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_num_datasets" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of all <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a>s contained in a
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_num_dsds">
<code class="descname">get_num_dsds</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_num_dsds" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of all <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a>s (<a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> descriptors)
contained in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_scene_height">
<code class="descname">get_scene_height</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_scene_height" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> scene height in pixels</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_scene_width">
<code class="descname">get_scene_width</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_scene_width" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> scene width in pixels</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_mph">
<code class="descname">get_mph</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_mph" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> representing the main product header (MPH)</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_sph">
<code class="descname">get_sph</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_sph" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> representing the specific product header (SPH)</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.read_bitmask_raster">
<code class="descname">read_bitmask_raster</code><span class="sig-paren">(</span><em>bm_expr</em>, <em>xoffset</em>, <em>yoffset</em>, <em>raster</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.read_bitmask_raster" title="Permalink to this definition">¶</a></dt>
<dd><blockquote>
<div><p>Calculates a bit-mask raster</p>
<p>Calculates a bit-mask, composed of flags of the given <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a>
and combined as described in the given bit-mask expression, for
the a certain dimension and sub-sampling as defined in the
given raster.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">param bm_expr:</th><td class="field-body">a string holding the logical expression for the definition
of the bit-mask. In a bit-mask expression, any number of
the flag-names (found in the DDDB) can be composed with
“(“, “)”, “NOT”, “AND”, “OR”. Valid bit-mask expression are
for example <code class="docutils literal"><span class="pre">flags.LAND</span> <span class="pre">OR</span> <span class="pre">flags.CLOUD</span></code> or
<code class="docutils literal"><span class="pre">NOT</span> <span class="pre">flags.WATER</span> <span class="pre">AND</span> <span class="pre">flags.TURBID_S</span></code></td>
</tr>
<tr class="field-even field"><th class="field-name">param xoffset:</th><td class="field-body">across-track co-ordinate in pixel co-ordinates (zero-based)
of the upper right corner of the source-region</td>
</tr>
<tr class="field-odd field"><th class="field-name">param yoffset:</th><td class="field-body">along-track co-ordinate in pixel co-ordinates (zero-based)
of the upper right corner of the source-region</td>
</tr>
<tr class="field-even field"><th class="field-name">param raster:</th><td class="field-body">the raster for the bit-mask. The data type of the raster
must be either <a class="reference internal" href="#epr.E_TID_UCHAR" title="epr.E_TID_UCHAR"><code class="xref py py-data docutils literal"><span class="pre">E_TID_UCHAR</span></code></a> or <a class="reference internal" href="#epr.E_TID_CHAR" title="epr.E_TID_CHAR"><code class="xref py py-data docutils literal"><span class="pre">E_TID_CHAR</span></code></a></td>
</tr>
<tr class="field-odd field"><th class="field-name">returns:</th><td class="field-body">zero for success, an error code otherwise</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.create_bitmask_raster" title="epr.create_bitmask_raster"><code class="xref py py-func docutils literal"><span class="pre">create_bitmask_raster()</span></code></a></p>
</div>
</div></blockquote>
<dl class="method">
<dt id="epr.Product.close">
<code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Closes the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> product and free the underlying
file descriptor.</p>
<p>This method has no effect if the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> is already
closed. Once the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> is closed, any operation on
it will raise a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.6)"><code class="xref py py-exc docutils literal"><span class="pre">ValueError</span></code></a>.</p>
<p>As a convenience, it is allowed to call this method more than
once; only the first call, however, will have an effect.</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.flush">
<code class="descname">flush</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.flush" title="Permalink to this definition">¶</a></dt>
<dd><p>Flush the file stream</p>
</dd></dl>
</dd></dl>
<p class="rubric">High level interface methods</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the following methods are part of the <em>high level</em> Python API and
do not have any corresponding function in the C API.</p>
</div>
<dl class="attribute">
<dt id="epr.Product.closed">
<code class="descname">closed</code><a class="headerlink" href="#epr.Product.closed" title="Permalink to this definition">¶</a></dt>
<dd><p>True if the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> is closed.</p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_dataset_names">
<code class="descname">get_dataset_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_dataset_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of names of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a>s in the
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.get_band_names">
<code class="descname">get_band_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.get_band_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of names of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a>s in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.datasets">
<code class="descname">datasets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.datasets" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a>s in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Product.bands">
<code class="descname">bands</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Product.bands" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a>s in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
<li>__str__</li>
<li>__enter__</li>
<li>__exit__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="dataset">
<span id="index-1"></span><h3>Dataset<a class="headerlink" href="#dataset" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Dataset">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Dataset</code><a class="headerlink" href="#epr.Dataset" title="Permalink to this definition">¶</a></dt>
<dd><p>ENVISAT dataset</p>
<p>The Dataset class contains information about a dataset within an
ENVISAT product file which has been opened with the <a class="reference internal" href="#epr.open" title="epr.open"><code class="xref py py-func docutils literal"><span class="pre">open()</span></code></a>
function.</p>
<p>A new Dataset instance can be obtained with the
<a class="reference internal" href="#epr.Product.get_dataset" title="epr.Product.get_dataset"><code class="xref py py-meth docutils literal"><span class="pre">Product.get_dataset()</span></code></a> or <a class="reference internal" href="#epr.Product.get_dataset_at" title="epr.Product.get_dataset_at"><code class="xref py py-meth docutils literal"><span class="pre">Product.get_dataset_at()</span></code></a> methods.</p>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Dataset.description">
<code class="descname">description</code><a class="headerlink" href="#epr.Dataset.description" title="Permalink to this definition">¶</a></dt>
<dd><p>A short description of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> contents</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Dataset.product">
<code class="descname">product</code><a class="headerlink" href="#epr.Dataset.product" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> instance to which this <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> belongs to</p>
</dd></dl>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="epr.Dataset.get_name">
<code class="descname">get_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.get_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the name of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Dataset.get_dsd">
<code class="descname">get_dsd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.get_dsd" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> descriptor (<a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a>)</p>
</dd></dl>
<dl class="method">
<dt id="epr.Dataset.get_dsd_name">
<code class="descname">get_dsd_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.get_dsd_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the name of the <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> (<a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> descriptor)</p>
</dd></dl>
<dl class="method">
<dt id="epr.Dataset.get_num_records">
<code class="descname">get_num_records</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.get_num_records" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>s of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Dataset.create_record">
<code class="descname">create_record</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.create_record" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
<p>Creates a new, empty <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> with a structure compatible with
the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a>. Such a <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> is typically used in
subsequent calls to <a class="reference internal" href="#epr.Dataset.read_record" title="epr.Dataset.read_record"><code class="xref py py-meth docutils literal"><span class="pre">Dataset.read_record()</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the new <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> instance</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Dataset.read_record">
<code class="descname">read_record</code><span class="sig-paren">(</span><em>index</em><span class="optional">[</span>, <em>record</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.read_record" title="Permalink to this definition">¶</a></dt>
<dd><p>Reads specified <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
<p>The <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> is identified through the given zero-based
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> index. In order to reduce memory reallocation, a
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> (pre-)created by the method
<a class="reference internal" href="#epr.Dataset.create_record" title="epr.Dataset.create_record"><code class="xref py py-meth docutils literal"><span class="pre">Dataset.create_record()</span></code></a> can be passed to this method.
Data is then read into this given <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>.</p>
<p>If no <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> (<code class="docutils literal"><span class="pre">None</span></code>) is given, the method initiates a new
one.</p>
<p>In both cases, the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> in which the data is read into will
be returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>index</strong> – the zero-based <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> index (default: 0)</li>
<li><strong>record</strong> – a pre-created <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> to reduce memory reallocation,
can be <code class="docutils literal"><span class="pre">None</span></code> (default) to let the function allocate a new
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the record in which the data has been read into or raises
an exception (<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a>) if an error occurred</p>
</td>
</tr>
</tbody>
</table>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 0.9: </span>The <em>index</em> parameter now defaults to zero</p>
</div>
</dd></dl>
<p class="rubric">High level interface methods</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the following methods are part of the <em>high level</em> Python API and
do not have any corresponding function in the C API.</p>
</div>
<dl class="method">
<dt id="epr.Dataset.records">
<code class="descname">records</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Dataset.records" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>s contained in the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
<li>__str__</li>
<li>__iter__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="record">
<span id="index-2"></span><h3>Record<a class="headerlink" href="#record" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Record">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Record</code><a class="headerlink" href="#epr.Record" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a record read from an ENVISAT dataset</p>
<p>A record is composed of multiple fields.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</div>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Record.dataset_name">
<code class="descname">dataset_name</code><a class="headerlink" href="#epr.Record.dataset_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> to which this <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> belongs to</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="epr.Record.tot_size">
<code class="descname">tot_size</code><a class="headerlink" href="#epr.Record.tot_size" title="Permalink to this definition">¶</a></dt>
<dd><p>The total size in bytes of the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
<p>It includes all data elements of all <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>s of a
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> in a <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file.</p>
<p><em>tot_size</em> is a derived variable, it is computed at run-time
and not stored in the DSD-DB.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="epr.Record.index">
<code class="descname">index</code><a class="headerlink" href="#epr.Record.index" title="Permalink to this definition">¶</a></dt>
<dd><blockquote>
<div><p>Index of the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> within the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
<p>It is <em>None</em> for empty <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>s (created with
<a class="reference internal" href="#epr.Dataset.create_record" title="epr.Dataset.create_record"><code class="xref py py-meth docutils literal"><span class="pre">Dataset.create_record()</span></code></a> but still not read) and for <em>MPH</em>
(see <a class="reference internal" href="#epr.Product.get_mph" title="epr.Product.get_mph"><code class="xref py py-meth docutils literal"><span class="pre">Product.get_mph()</span></code></a>) and <em>SPH</em> (see <a class="reference internal" href="#epr.Product.get_sph" title="epr.Product.get_sph"><code class="xref py py-meth docutils literal"><span class="pre">Product.get_sph()</span></code></a>)
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>s.</p>
</div></blockquote>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.Dataset.read_record" title="epr.Dataset.read_record"><code class="xref py py-meth docutils literal"><span class="pre">Dataset.read_record()</span></code></a></p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="epr.Record.get_field">
<code class="descname">get_field</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.get_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> specified by name</p>
<p>The <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> is here identified through the given name.
It contains the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> info and all corresponding values.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> – the the name of required <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the specified <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> or raises an exception
(<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a>) if an error occurred</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Record.get_field_at">
<code class="descname">get_field_at</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.get_field_at" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> at the specified position within the
<a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – the zero-based index (position within <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a>) of the
<a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> or raises and exception (<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a>)
if an error occurred</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Record.get_num_fields">
<code class="descname">get_num_fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.get_num_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>s contained in the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Record.print_">
<code class="descname">print_</code><span class="sig-paren">(</span><span class="optional">[</span><em>ostream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.print_" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> to specified file (default: <a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<p>This method writes formatted contents of the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> to
specified <em>ostream</em> text file or (default) the ASCII output
is be printed to standard output (<a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ostream</strong> – the (opened) output file object</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the <em>ostream</em> parameter have to be a <em>real</em> file not
a generic stream object like <code class="xref py py-class docutils literal"><span class="pre">StringIO.StringIO</span></code>
instances</p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Record.print_element">
<code class="descname">print_element</code><span class="sig-paren">(</span><em>field_index</em>, <em>element_index</em><span class="optional">[</span>, <em>ostream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.print_element" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the specified field element to file (default: <a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<p>This method writes formatted contents of the specified <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>
element to the <em>ostream</em> text file or (default) the ASCII output
will be printed to standard output (<a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>field_index</strong> – the index of <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> in the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></li>
<li><strong>element_index</strong> – the index of element in the specified <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></li>
<li><strong>ostream</strong> – the (opened) output file object</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the <em>ostream</em> parameter have to be a <em>real</em> file not
a generic stream object like <code class="xref py py-class docutils literal"><span class="pre">StringIO.StringIO</span></code>
instances</p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Record.get_offset">
<code class="descname">get_offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.get_offset" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> offset in bytes within the <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<p class="rubric">High level interface methods</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the following methods are part of the <em>high level</em> Python API and
do not have any corresponding function in the C API.</p>
</div>
<dl class="method">
<dt id="epr.Record.get_field_names">
<code class="descname">get_field_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.get_field_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of names of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>s in the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Record.fields">
<code class="descname">fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Record.fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>s contained in the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
<li>__str__</li>
<li>__iter__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="field">
<span id="index-3"></span><h3>Field<a class="headerlink" href="#field" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Field">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Field</code><a class="headerlink" href="#epr.Field" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a field within a record</p>
<p>A <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> is composed of one or more data elements of one of the
types defined in the internal <code class="docutils literal"><span class="pre">field_info</span></code> structure.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
</div>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Field.tot_size">
<code class="descname">tot_size</code><a class="headerlink" href="#epr.Field.tot_size" title="Permalink to this definition">¶</a></dt>
<dd><blockquote>
<div><p>The total size in bytes of all data elements of a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>.</p>
<p><em>tot_size</em> is a derived variable, it is computed at run-time and
not stored in the DSD-DB.</p>
</div></blockquote>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_description">
<code class="descname">get_description</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_description" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the description of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_name">
<code class="descname">get_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the name of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_num_elems">
<code class="descname">get_num_elems</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_num_elems" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the number of elements of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_type">
<code class="descname">get_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the type of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_unit">
<code class="descname">get_unit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_unit" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the unit of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_elem">
<code class="descname">get_elem</code><span class="sig-paren">(</span><span class="optional">[</span><em>index</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_elem" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> single element access</p>
<p>This function is for getting the elements of a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> – the zero-based index of element to be returned, must not be
negative. Default: 0.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the typed value from given <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_elems">
<code class="descname">get_elems</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_elems" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> array element access</p>
<p>This function is for getting an array of field elements of the
<a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the data array (<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.13)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a>) having the type of
the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a></td>
</tr>
</tbody>
</table>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 0.9: </span>the returned <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.13)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a> shares the data buffer with
the C <code class="xref c c-type docutils literal"><span class="pre">Field</span></code> structure so any change in its contents is
also reflected to the <code class="xref py py-class docutils literal"><span class="pre">Filed</span></code> object</p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Field.set_elem">
<code class="descname">set_elem</code><span class="sig-paren">(</span><em>elem</em><span class="optional">[</span>, <em>index</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.set_elem" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> array element</p>
<p>This function is for setting an array of field element of the
<a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>elem</strong> – value of the element to set</li>
<li><strong>index</strong> – the zero-based index of element to be set, must not be
negative. Default: 0.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">this method does not have any corresponding function in the C API.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Field.set_elems">
<code class="descname">set_elems</code><span class="sig-paren">(</span><em>elems</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.set_elems" title="Permalink to this definition">¶</a></dt>
<dd><p>Set <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> array elements</p>
<p>This function is for setting an array of <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> elements of
the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>elems</strong> – np.ndarray of elements to set</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">this method does not have any corresponding function in the C API.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Field.print_">
<code class="descname">print_</code><span class="sig-paren">(</span><span class="optional">[</span><em>ostream</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.print_" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> to specified file (default: <a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<p>This method writes formatted contents of the <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> to
specified <em>ostream</em> text file or (default) the ASCII output
is be printed to standard output (<a class="reference external" href="https://docs.python.org/3/library/sys.html#sys.stdout" title="(in Python v3.6)"><code class="xref py py-data docutils literal"><span class="pre">sys.stdout</span></code></a>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ostream</strong> – the (opened) output file object</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the <em>ostream</em> parameter have to be a <em>real</em> file not
a generic stream object like <code class="xref py py-class docutils literal"><span class="pre">StringIO.StringIO</span></code>
instances</p>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Field.get_offset">
<code class="descname">get_offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Field.get_offset" title="Permalink to this definition">¶</a></dt>
<dd><p>Field offset in bytes within the <a class="reference internal" href="#epr.Record" title="epr.Record"><code class="xref py py-class docutils literal"><span class="pre">Record</span></code></a></p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
<li>__str__</li>
<li>__eq__</li>
<li>__ne__</li>
<li>__len__ <a class="footnote-reference" href="#id2" id="id1">[1]</a></li>
</ul>
</dd></dl>
<p class="rubric" id="index-4">Footnotes</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>if the field is a <a class="reference internal" href="#epr.E_TID_STRING" title="epr.E_TID_STRING"><code class="xref py py-data docutils literal"><span class="pre">E_TID_STRING</span></code></a> field then the
<code class="xref py py-meth docutils literal"><span class="pre">__len__()</span></code> method returns the string length, otherwise the
number of elements of the field is returned (same as
<a class="reference internal" href="#epr.Field.get_num_elems" title="epr.Field.get_num_elems"><code class="xref py py-meth docutils literal"><span class="pre">Field.get_num_elems()</span></code></a>)</td></tr>
</tbody>
</table>
</div>
<div class="section" id="dsd">
<h3>DSD<a class="headerlink" href="#dsd" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.DSD">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">DSD</code><a class="headerlink" href="#epr.DSD" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> descriptor</p>
<p>The DSD class contains information about the properties of a
<a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> and its location within an ENVISAT <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file</p>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.DSD.ds_name">
<code class="descname">ds_name</code><a class="headerlink" href="#epr.DSD.ds_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> name</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.ds_offset">
<code class="descname">ds_offset</code><a class="headerlink" href="#epr.DSD.ds_offset" title="Permalink to this definition">¶</a></dt>
<dd><p>The offset of <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.ds_size">
<code class="descname">ds_size</code><a class="headerlink" href="#epr.DSD.ds_size" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> in the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.ds_type">
<code class="descname">ds_type</code><a class="headerlink" href="#epr.DSD.ds_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> type descriptor</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.dsr_size">
<code class="descname">dsr_size</code><a class="headerlink" href="#epr.DSD.dsr_size" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of dataset record for the given <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> name</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.filename">
<code class="descname">filename</code><a class="headerlink" href="#epr.DSD.filename" title="Permalink to this definition">¶</a></dt>
<dd><p>The filename in the DDDB with the description of this <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.index">
<code class="descname">index</code><a class="headerlink" href="#epr.DSD.index" title="Permalink to this definition">¶</a></dt>
<dd><p>The index of this <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> (zero-based)</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.DSD.num_dsr">
<code class="descname">num_dsr</code><a class="headerlink" href="#epr.DSD.num_dsr" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of dataset records for the given <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> name</p>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
<li>__eq__</li>
<li>__ne__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="band">
<span id="index-5"></span><h3>Band<a class="headerlink" href="#band" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Band">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Band</code><a class="headerlink" href="#epr.Band" title="Permalink to this definition">¶</a></dt>
<dd><p>The band of an ENVISAT <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a></p>
<p>The Band class contains information about a band within an ENVISAT
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file which has been opened with the <a class="reference internal" href="#epr.open" title="epr.open"><code class="xref py py-func docutils literal"><span class="pre">open()</span></code></a>
function.</p>
<p>A new Band instance can be obtained with the <a class="reference internal" href="#epr.Product.get_band" title="epr.Product.get_band"><code class="xref py py-meth docutils literal"><span class="pre">Product.get_band()</span></code></a>
method.</p>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Band.bm_expr">
<code class="descname">bm_expr</code><a class="headerlink" href="#epr.Band.bm_expr" title="Permalink to this definition">¶</a></dt>
<dd><p>A bit-mask expression used to filter valid pixels</p>
<p>All others are set to zero</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.data_type">
<code class="descname">data_type</code><a class="headerlink" href="#epr.Band.data_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The data type of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> pixels</p>
<p>Possible values are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">*</span></code> –> the datatype remains unchanged.</li>
<li><code class="docutils literal"><span class="pre">uint8_t</span></code> –> 8-bit unsigned integer</li>
<li><code class="docutils literal"><span class="pre">uint32_t</span></code> –> 32-bit unsigned integer</li>
<li><code class="docutils literal"><span class="pre">Float</span></code> –> 32-bit IEEE floating point</li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.description">
<code class="descname">description</code><a class="headerlink" href="#epr.Band.description" title="Permalink to this definition">¶</a></dt>
<dd><p>A short description of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> contents</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.lines_mirrored">
<code class="descname">lines_mirrored</code><a class="headerlink" href="#epr.Band.lines_mirrored" title="Permalink to this definition">¶</a></dt>
<dd><p>Mirrored lines flag</p>
<p>If true (=1) lines will be mirrored (flipped) after read into a
raster in order to ensure a pixel ordering in raster X direction
from WEST to EAST.</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.product">
<code class="descname">product</code><a class="headerlink" href="#epr.Band.product" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> instance to which this <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> belongs to</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.sample_model">
<code class="descname">sample_model</code><a class="headerlink" href="#epr.Band.sample_model" title="Permalink to this definition">¶</a></dt>
<dd><p>The sample model operation</p>
<p>The sample model operation applied to the source <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> for
getting the correct samples from the MDS (for example MERIS L2).</p>
<p>Possible values are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">*</span></code> –> no operation (direct copy)</li>
<li><code class="docutils literal"><span class="pre">1OF2</span></code> –> first byte of 2-byte interleaved MDS</li>
<li><code class="docutils literal"><span class="pre">2OF2</span></code> –> second byte of 2-byte interleaved MDS</li>
<li><code class="docutils literal"><span class="pre">0123</span></code> –> combine 3-bytes interleaved to 4-byte integer</li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.scaling_factor">
<code class="descname">scaling_factor</code><a class="headerlink" href="#epr.Band.scaling_factor" title="Permalink to this definition">¶</a></dt>
<dd><p>The scaling factor</p>
<p>Possible values are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">*</span></code> –> no factor provided (implies scaling_method=*)</li>
<li><code class="docutils literal"><span class="pre">const</span></code> –> a floating point constant</li>
<li><code class="docutils literal"><span class="pre">GADS.field[.field2]</span></code> –> value is provided in global
annotation <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> with name <cite>GADS</cite> in <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>
<cite>field</cite>.
Optionally a second element index for multiple-element fields
can be given too</li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.scaling_method">
<code class="descname">scaling_method</code><a class="headerlink" href="#epr.Band.scaling_method" title="Permalink to this definition">¶</a></dt>
<dd><p>The scaling method which must be applied to the raw source data
in order to get the ‘real’ pixel values in geo-physical units.</p>
<p>Possible values are:</p>
<ul>
<li><p class="first"><code class="docutils literal"><span class="pre">*</span></code> –> no scaling applied</p>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">Linear_Scale</span></code> –> linear scaling applied:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">y</span> <span class="o">=</span> <span class="n">offset</span> <span class="o">+</span> <span class="n">scale</span> <span class="o">*</span> <span class="n">x</span>
</pre></div>
</div>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">Log_Scale</span></code> –> logarithmic scaling applied:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">y</span> <span class="o">=</span> <span class="n">log10</span><span class="p">(</span><span class="n">offset</span> <span class="o">+</span> <span class="n">scale</span> <span class="o">*</span> <span class="n">x</span><span class="p">)</span>
</pre></div>
</div>
</li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.scaling_offset">
<code class="descname">scaling_offset</code><a class="headerlink" href="#epr.Band.scaling_offset" title="Permalink to this definition">¶</a></dt>
<dd><p>Possible values are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">*</span></code> –> no offset provided (implies scaling_method=*)</li>
<li><code class="docutils literal"><span class="pre">const</span></code> –> a floating point constant</li>
<li><code class="docutils literal"><span class="pre">GADS.field[.field2]`</span> <span class="pre">--></span> <span class="pre">value</span> <span class="pre">is</span> <span class="pre">provided</span> <span class="pre">in</span> <span class="pre">global</span>
<span class="pre">annotation</span> <span class="pre">:class:`Dataset`</span> <span class="pre">with</span> <span class="pre">name</span> <span class="pre">``GADS</span></code> in <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a>
<code class="docutils literal"><span class="pre">field</span></code>.
Optionally a second element index for multiple-element fields
can be given too</li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.spectr_band_index">
<code class="descname">spectr_band_index</code><a class="headerlink" href="#epr.Band.spectr_band_index" title="Permalink to this definition">¶</a></dt>
<dd><p>The (zero-based) spectral <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> index</p>
<blockquote>
<div>-1 if this is not a spectral <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a></div></blockquote>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.unit">
<code class="descname">unit</code><a class="headerlink" href="#epr.Band.unit" title="Permalink to this definition">¶</a></dt>
<dd><p>The geophysical unit for the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> pixel values</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Band.dataset">
<code class="descname">dataset</code><a class="headerlink" href="#epr.Band.dataset" title="Permalink to this definition">¶</a></dt>
<dd><p>The source <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a></p>
<p>The source <a class="reference internal" href="#epr.Dataset" title="epr.Dataset"><code class="xref py py-class docutils literal"><span class="pre">Dataset</span></code></a> containing the raw data used to create the
<a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> pixel values.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="epr.Band.get_name">
<code class="descname">get_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Band.get_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the name of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="epr.Band.create_compatible_raster">
<code class="descname">create_compatible_raster</code><span class="sig-paren">(</span><span class="optional">[</span><em>src_width</em>, <em>src_height</em>, <em>xstep</em>, <em>ystep</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Band.create_compatible_raster" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> which is compatible with the data type of
the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a></p>
<p>The created <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> is used to read the data in it (see
<a class="reference internal" href="#epr.Band.read_raster" title="epr.Band.read_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.read_raster()</span></code></a>).</p>
<p>The <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> is defined on the grid of the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a>,
from which the data are read. Spatial subsets and under-sampling are
possible) through the parameter of the method.</p>
<p>A <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> is an object that allows direct access to data of a
certain portion of the ENVISAT <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> that are read into the
it. Such a portion is called the source. The complete ENVISAT
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> can be much greater than the source.
One can move the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> over the complete ENVISAT
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> and read in turn different parts
(always of the size of the source) of it into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>.
The source is specified by the parameters <em>height</em> and <em>width</em>.</p>
<p>A typical example is a processing in blocks. Lets say, a block
has 64x32 pixel. Then, my source has a width of 64 pixel and a
height of 32 pixel.</p>
<p>Another example is a processing of complete image lines. Then,
my source has a widths of the complete product (for example 1121
for a MERIS RR product), and a height of 1). One can loop over
all blocks read into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> and process it.</p>
<p>In addition, it is possible to defined a sub-sampling step for
a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. This means, that the source is not read 1:1 into
the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>, but that only every 2nd or 3rd pixel is read.
This step can be set differently for the across track (source_step_x)
and along track (source_step_y) directions.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>src_width</strong> – the width (across track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: scene width (see
<a class="reference internal" href="#epr.Product.get_scene_width" title="epr.Product.get_scene_width"><code class="xref py py-attr docutils literal"><span class="pre">Product.get_scene_width</span></code></a>)</li>
<li><strong>src_height</strong> – the height (along track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: scene height (see
<a class="reference internal" href="#epr.Product.get_scene_height" title="epr.Product.get_scene_height"><code class="xref py py-attr docutils literal"><span class="pre">Product.get_scene_height</span></code></a>)</li>
<li><strong>xstep</strong> – the sub-sampling step across track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
<li><strong>ystep</strong> – the sub-sampling step along track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the new <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> instance or raises an exception
(<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a>) if an error occurred</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p><em>src_width</em> and <em>src_height</em> are the dimantion of the of the source
area. If one specifies a <em>step</em> parameter the resulting
<a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> will have a size that is smaller that the specifies
source size:</p>
<div class="last highlight-default"><div class="highlight"><pre><span></span><span class="n">raster_size</span> <span class="o">=</span> <span class="n">src_size</span> <span class="o">//</span> <span class="n">step</span>
</pre></div>
</div>
</div>
</dd></dl>
<dl class="method">
<dt id="epr.Band.read_raster">
<code class="descname">read_raster</code><span class="sig-paren">(</span><span class="optional">[</span><em>xoffset</em>, <em>yoffset</em>, <em>raster</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Band.read_raster" title="Permalink to this definition">¶</a></dt>
<dd><p>Reads (geo-)physical values of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> of the specified
source-region</p>
<p>The source-region is a defined part of the whole ENVISAT
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> image, which shall be read into a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>.
In this routine the co-ordinates are specified, where the
source-region to be read starts.
The dimension of the region and the sub-sampling are attributes
of the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> into which the data are read.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>xoffset</strong> – across-track source co-ordinate in pixel co-ordinates
(zero-based) of the upper right corner of the source-region.
Default 0.</li>
<li><strong>yoffset</strong> – along-track source co-ordinate in pixel co-ordinates
(zero-based) of the upper right corner of the source-region.
Default 0.</li>
<li><strong>raster</strong> – <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> instance set with appropriate parameters to
read into. If not provided a new <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> is
instantiated</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> instance in which data are read</p>
</td>
</tr>
</tbody>
</table>
<p>This method raises an instance of the appropriate
<a class="reference internal" href="#epr.EPRError" title="epr.EPRError"><code class="xref py py-exc docutils literal"><span class="pre">EPRError</span></code></a> sub-class if case of errors</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a> and
<a class="reference internal" href="#epr.create_raster" title="epr.create_raster"><code class="xref py py-func docutils literal"><span class="pre">create_raster()</span></code></a></p>
</div>
</dd></dl>
<p class="rubric">High level interface methods</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the following methods are part of the <em>high level</em> Python API and
do not have any corresponding function in the C API.</p>
</div>
<dl class="method">
<dt id="epr.Band.read_as_array">
<code class="descname">read_as_array</code><span class="sig-paren">(</span><span class="optional">[</span><em>width</em>, <em>height</em>, <em>xoffset</em>, <em>yoffset</em>, <em>xstep</em>, <em>ystep</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Band.read_as_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Reads the specified source region as an <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.13)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a></p>
<p>The source-region is a defined part of the whole ENVISAT
<a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> image, which shall be read into a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>.
In this routine the co-ordinates are specified, where the
source-region to be read starts.
The dimension of the region and the sub-sampling are attributes
of the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> into which the data are read.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>src_width</strong> – the width (across track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. If not provided reads as much as
possible</li>
<li><strong>src_height</strong> – the height (along track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>, If not provided reads as much as
possible</li>
<li><strong>xoffset</strong> – across-track source co-ordinate in pixel co-ordinates
(zero-based) of the upper right corner of the source-region.
Default 0.</li>
<li><strong>yoffset</strong> – along-track source co-ordinate in pixel co-ordinates
(zero-based) of the upper right corner of the source-region.
Default 0.</li>
<li><strong>xstep</strong> – the sub-sampling step across track of the source when
reading into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1</li>
<li><strong>ystep</strong> – the sub-sampling step along track of the source when
reading into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.13)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a> instance in which data are read</p>
</td>
</tr>
</tbody>
</table>
<p>This method raises an instance of the appropriate
<a class="reference internal" href="#epr.EPRError" title="epr.EPRError"><code class="xref py py-exc docutils literal"><span class="pre">EPRError</span></code></a> sub-class if case of errors</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a>,
<a class="reference internal" href="#epr.create_raster" title="epr.create_raster"><code class="xref py py-func docutils literal"><span class="pre">create_raster()</span></code></a> and <a class="reference internal" href="#epr.Band.read_raster" title="epr.Band.read_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.read_raster()</span></code></a></p>
</div>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="raster">
<span id="index-6"></span><h3>Raster<a class="headerlink" href="#raster" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.Raster">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">Raster</code><a class="headerlink" href="#epr.Raster" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a raster in which data will be stored</p>
<p>All ‘size’ parameter are in PIXEL.</p>
<p class="rubric">Attributes</p>
<dl class="attribute">
<dt id="epr.Raster.data_type">
<code class="descname">data_type</code><a class="headerlink" href="#epr.Raster.data_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The data type of the <a class="reference internal" href="#epr.Band" title="epr.Band"><code class="xref py py-class docutils literal"><span class="pre">Band</span></code></a> pixels</p>
<p>All <code class="docutils literal"><span class="pre">E_TID_*</span></code> types are possible</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Raster.source_height">
<code class="descname">source_height</code><a class="headerlink" href="#epr.Raster.source_height" title="Permalink to this definition">¶</a></dt>
<dd><p>The height of the source</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Raster.source_width">
<code class="descname">source_width</code><a class="headerlink" href="#epr.Raster.source_width" title="Permalink to this definition">¶</a></dt>
<dd><p>The width of the source</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Raster.source_step_x">
<code class="descname">source_step_x</code><a class="headerlink" href="#epr.Raster.source_step_x" title="Permalink to this definition">¶</a></dt>
<dd><p>The sub-sampling for the across-track direction in pixel</p>
</dd></dl>
<dl class="attribute">
<dt id="epr.Raster.source_step_y">
<code class="descname">source_step_y</code><a class="headerlink" href="#epr.Raster.source_step_y" title="Permalink to this definition">¶</a></dt>
<dd><p>The sub-sampling for the along-track direction in pixel</p>
</dd></dl>
<p class="rubric">High level interface attributes</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the following attributess are part of the <em>high level</em> Python API and
do not have a counterpart in the C API.</p>
</div>
<dl class="attribute">
<dt id="epr.Raster.data">
<code class="descname">data</code><a class="headerlink" href="#epr.Raster.data" title="Permalink to this definition">¶</a></dt>
<dd><p>Raster data exposed as <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.13)"><code class="xref py py-class docutils literal"><span class="pre">numpy.ndarray</span></code></a> object</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">this property shares the data buffer with the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>
object so any change in its contents is also reflected to
the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> object</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> objects do not have a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> named
<em>data</em> in the corresponding C structure. The <em>EPR_SRaster</em> C
structure have a <a class="reference internal" href="#epr.Field" title="epr.Field"><code class="xref py py-class docutils literal"><span class="pre">Field</span></code></a> named <em>buffer</em> that is a raw
pointer to the data buffer and it is not exposed as such in the
Python API.</p>
</div>
</dd></dl>
<p class="rubric">Methods</p>
<dl class="method">
<dt id="epr.Raster.get_pixel">
<code class="descname">get_pixel</code><span class="sig-paren">(</span><em>x</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.Raster.get_pixel" title="Permalink to this definition">¶</a></dt>
<dd><p>Single pixel access</p>
<p>This function is for getting the values of the elements of a
<a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> (i.e. pixel)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>x</strong> – the (zero-based) X coordinate of the pixel</li>
<li><strong>y</strong> – the (zero-based) Y coordinate of the pixel</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the typed value at the given co-ordinate</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="epr.Raster.get_elem_size">
<code class="descname">get_elem_size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Raster.get_elem_size" title="Permalink to this definition">¶</a></dt>
<dd><p>The size in byte of a single element (sample) of this <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>
buffer</p>
</dd></dl>
<dl class="method">
<dt id="epr.Raster.get_height">
<code class="descname">get_height</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Raster.get_height" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> height in pixels</p>
</dd></dl>
<dl class="method">
<dt id="epr.Raster.get_width">
<code class="descname">get_width</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.Raster.get_width" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> width in pixels</p>
</dd></dl>
<p class="rubric">Special methods</p>
<p>The <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> class provides a custom implementation of the
following <em>special methods</em>:</p>
<ul class="simple">
<li>__repr__</li>
</ul>
</dd></dl>
</div>
<div class="section" id="eprtime">
<span id="index-7"></span><h3>EPRTime<a class="headerlink" href="#eprtime" title="Permalink to this headline">¶</a></h3>
<dl class="class">
<dt id="epr.EPRTime">
<em class="property">class </em><code class="descclassname">epr.</code><code class="descname">EPRTime</code><a class="headerlink" href="#epr.EPRTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Convenience class for time data exchange.</p>
<p>EPRTime is a <code class="xref py py-class docutils literal"><span class="pre">collections.namedtuple</span></code> with the following fields:</p>
<dl class="attribute">
<dt id="epr.EPRTime.days">
<code class="descname">days</code><a class="headerlink" href="#epr.EPRTime.days" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="epr.EPRTime.seconds">
<code class="descname">seconds</code><a class="headerlink" href="#epr.EPRTime.seconds" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="epr.EPRTime.microseconds">
<code class="descname">microseconds</code><a class="headerlink" href="#epr.EPRTime.microseconds" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
</div>
<div class="section" id="functions">
<span id="index-8"></span><h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="epr.open">
<code class="descclassname">epr.</code><code class="descname">open</code><span class="sig-paren">(</span><em>filename</em>, <em>mode='rb'</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.open" title="Permalink to this definition">¶</a></dt>
<dd><p>Opens the ENVISAT product</p>
<p>Opens the ENVISAT <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file with the given file path,
reads MPH, SPH and all <a class="reference internal" href="#epr.DSD" title="epr.DSD"><code class="xref py py-class docutils literal"><span class="pre">DSD</span></code></a>s, organized the table with
parameter of line length and tie points number.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>product_file_path</strong> – the path to the ENVISAT <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> file</li>
<li><strong>mode</strong> – string that specifies the mode in which the file is opened.
Allowed values: <cite>rb</cite> for read-only mode, <cite>rb+</cite> for read-write
mode. Default: mode=`rb`.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> instance representing the specified
product. An exception (<code class="xref py py-exc docutils literal"><span class="pre">exceptions.ValueError</span></code>) is raised
if the file could not be opened.</p>
</td>
</tr>
</tbody>
</table>
<p>The <a class="reference internal" href="#epr.Product" title="epr.Product"><code class="xref py py-class docutils literal"><span class="pre">Product</span></code></a> class supports context management so the recommended
way to ensure that a product is actually closed as soon as a task is
completed is to use the <code class="docutils literal"><span class="pre">with</span></code> statement:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">'ASA_IMP_1PNUPA20060202_ ... _3110.N1'</span><span class="p">)</span> <span class="k">as</span> <span class="n">product</span><span class="p">:</span>
<span class="n">dataset</span> <span class="o">=</span> <span class="n">product</span><span class="o">.</span><span class="n">get_dataset</span><span class="p">(</span><span class="s1">'MAIN_PROCESSING_PARAMS_ADS'</span><span class="p">)</span>
<span class="n">record</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">read_record</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">record</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="epr.data_type_id_to_str">
<code class="descclassname">epr.</code><code class="descname">data_type_id_to_str</code><span class="sig-paren">(</span><em>type_id</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.data_type_id_to_str" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the ‘C’ data type string for the given data type</p>
</dd></dl>
<dl class="function">
<dt id="epr.get_data_type_size">
<code class="descclassname">epr.</code><code class="descname">get_data_type_size</code><span class="sig-paren">(</span><em>type_id</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.get_data_type_size" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the size in bytes for an element of the given data type</p>
</dd></dl>
<dl class="function">
<dt id="epr.get_numpy_dtype">
<code class="descclassname">epr.</code><code class="descname">get_numpy_dtype</code><span class="sig-paren">(</span><em>type_id</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.get_numpy_dtype" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the numpy data-type specified EPR type ID</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.9.</span></p>
</div>
</dd></dl>
<dl class="function">
<dt id="epr.get_sample_model_name">
<code class="descclassname">epr.</code><code class="descname">get_sample_model_name</code><span class="sig-paren">(</span><em>model</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.get_sample_model_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the name of the specified sample model</p>
</dd></dl>
<dl class="function">
<dt id="epr.get_scaling_method_name">
<code class="descclassname">epr.</code><code class="descname">get_scaling_method_name</code><span class="sig-paren">(</span><em>method</em><span class="sig-paren">)</span><a class="headerlink" href="#epr.get_scaling_method_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the name of the specified scaling method</p>
</dd></dl>
<dl class="function">
<dt id="epr.create_raster">
<code class="descclassname">epr.</code><code class="descname">create_raster</code><span class="sig-paren">(</span><em>data_type</em>, <em>src_width</em>, <em>src_height</em><span class="optional">[</span>, <em>xstep</em>, <em>ystep</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.create_raster" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> of the specified data type</p>
<p>This function can be used to create any type of raster, e.g. for
later use as a bit-mask.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data_type</strong> – <p>the type of the data to stored in the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>, must be one
of E_TID_*.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#data-type-identifiers">Data type Identifiers</a></p>
</div>
</li>
<li><strong>src_width</strong> – the width (across track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>.
See description of <a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a></li>
<li><strong>src_height</strong> – the height (along track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>.
See description of <a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a></li>
<li><strong>xstep</strong> – the sub-sampling step across track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
<li><strong>ystep</strong> – the sub-sampling step along track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the new <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> instance</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">description of <a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a></p>
</div>
</dd></dl>
<dl class="function">
<dt id="epr.create_bitmask_raster">
<code class="descclassname">epr.</code><code class="descname">create_bitmask_raster</code><span class="sig-paren">(</span><em>src_width</em>, <em>src_height</em><span class="optional">[</span>, <em>xstep</em>, <em>ystep</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.create_bitmask_raster" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> to be used for reading bitmasks</p>
<p>The <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> returned always is of type <code class="docutils literal"><span class="pre">byte</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>src_width</strong> – the width (across track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a></li>
<li><strong>src_height</strong> – the height (along track dimension) of the source to be read
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a></li>
<li><strong>xstep</strong> – the sub-sampling step across track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
<li><strong>ystep</strong> – the sub-sampling step along track of the source when reading
into the <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a>. Default: 1.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the new <a class="reference internal" href="#epr.Raster" title="epr.Raster"><code class="xref py py-class docutils literal"><span class="pre">Raster</span></code></a> instance or raises an exception
(<a class="reference internal" href="#epr.EPRValueError" title="epr.EPRValueError"><code class="xref py py-exc docutils literal"><span class="pre">EPRValueError</span></code></a>) if an error occurred</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">the description of <a class="reference internal" href="#epr.Band.create_compatible_raster" title="epr.Band.create_compatible_raster"><code class="xref py py-meth docutils literal"><span class="pre">Band.create_compatible_raster()</span></code></a></p>
</div>
</dd></dl>
</div>
<div class="section" id="exceptions">
<span id="index-9"></span><h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="eprerror">
<h3>EPRError<a class="headerlink" href="#eprerror" title="Permalink to this headline">¶</a></h3>
<dl class="exception">
<dt id="epr.EPRError">
<em class="property">exception </em><code class="descclassname">epr.</code><code class="descname">EPRError</code><a class="headerlink" href="#epr.EPRError" title="Permalink to this definition">¶</a></dt>
<dd><p>EPR API error</p>
<dl class="attribute">
<dt id="epr.EPRError.code">
<code class="descname">code</code><a class="headerlink" href="#epr.EPRError.code" title="Permalink to this definition">¶</a></dt>
<dd><p>EPR API error code</p>
</dd></dl>
<dl class="method">
<dt id="epr.EPRError.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="optional">[</span><em>message</em><span class="optional">[</span>, <em>code</em>, <em>*args</em>, <em>**kwargs</em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#epr.EPRError.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializer</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> – error message</td>
</tr>
<tr class="field-even field"><th class="field-name">Pram code:</th><td class="field-body">EPR error code</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="eprvalueerror">
<h3>EPRValueError<a class="headerlink" href="#eprvalueerror" title="Permalink to this headline">¶</a></h3>
<dl class="exception">
<dt id="epr.EPRValueError">
<em class="property">exception </em><code class="descclassname">epr.</code><code class="descname">EPRValueError</code><a class="headerlink" href="#epr.EPRValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Inherits both <a class="reference internal" href="#epr.EPRError" title="epr.EPRError"><code class="xref py py-exc docutils literal"><span class="pre">EPRError</span></code></a> and standard <code class="xref py py-exc docutils literal"><span class="pre">exceptions.ValueError</span></code></p>
</dd></dl>
</div>
</div>
<div class="section" id="data">
<h2>Data<a class="headerlink" href="#data" title="Permalink to this headline">¶</a></h2>
<dl class="data">
<dt id="epr.__version__">
<code class="descclassname">epr.</code><code class="descname">__version__</code><a class="headerlink" href="#epr.__version__" title="Permalink to this definition">¶</a></dt>
<dd><p>Version string of PyEPR</p>
</dd></dl>
<dl class="data">
<dt id="epr.EPR_C_API_VERSION">
<code class="descclassname">epr.</code><code class="descname">EPR_C_API_VERSION</code><a class="headerlink" href="#epr.EPR_C_API_VERSION" title="Permalink to this definition">¶</a></dt>
<dd><p>Version string of the wrapped <a class="reference external" href="https://github.com/bcdev/epr-api">EPR API</a> C library</p>
</dd></dl>
<div class="section" id="data-type-identifiers">
<h3>Data type identifiers<a class="headerlink" href="#data-type-identifiers" title="Permalink to this headline">¶</a></h3>
<dl class="data">
<dt id="epr.E_TID_UNKNOWN">
<code class="descclassname">epr.</code><code class="descname">E_TID_UNKNOWN</code><a class="headerlink" href="#epr.E_TID_UNKNOWN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_UCHAR">
<code class="descclassname">epr.</code><code class="descname">E_TID_UCHAR</code><a class="headerlink" href="#epr.E_TID_UCHAR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_CHAR">
<code class="descclassname">epr.</code><code class="descname">E_TID_CHAR</code><a class="headerlink" href="#epr.E_TID_CHAR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_USHORT">
<code class="descclassname">epr.</code><code class="descname">E_TID_USHORT</code><a class="headerlink" href="#epr.E_TID_USHORT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_SHORT">
<code class="descclassname">epr.</code><code class="descname">E_TID_SHORT</code><a class="headerlink" href="#epr.E_TID_SHORT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_UINT">
<code class="descclassname">epr.</code><code class="descname">E_TID_UINT</code><a class="headerlink" href="#epr.E_TID_UINT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_INT">
<code class="descclassname">epr.</code><code class="descname">E_TID_INT</code><a class="headerlink" href="#epr.E_TID_INT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_FLOAT">
<code class="descclassname">epr.</code><code class="descname">E_TID_FLOAT</code><a class="headerlink" href="#epr.E_TID_FLOAT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_DOUBLE">
<code class="descclassname">epr.</code><code class="descname">E_TID_DOUBLE</code><a class="headerlink" href="#epr.E_TID_DOUBLE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_STRING">
<code class="descclassname">epr.</code><code class="descname">E_TID_STRING</code><a class="headerlink" href="#epr.E_TID_STRING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_SPARE">
<code class="descclassname">epr.</code><code class="descname">E_TID_SPARE</code><a class="headerlink" href="#epr.E_TID_SPARE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_TID_TIME">
<code class="descclassname">epr.</code><code class="descname">E_TID_TIME</code><a class="headerlink" href="#epr.E_TID_TIME" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="sample-models">
<span id="index-10"></span><h3>Sample Models<a class="headerlink" href="#sample-models" title="Permalink to this headline">¶</a></h3>
<dl class="data">
<dt id="epr.E_SMOD_1OF1">
<code class="descclassname">epr.</code><code class="descname">E_SMOD_1OF1</code><a class="headerlink" href="#epr.E_SMOD_1OF1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_SMOD_1OF2">
<code class="descclassname">epr.</code><code class="descname">E_SMOD_1OF2</code><a class="headerlink" href="#epr.E_SMOD_1OF2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_SMOD_2OF2">
<code class="descclassname">epr.</code><code class="descname">E_SMOD_2OF2</code><a class="headerlink" href="#epr.E_SMOD_2OF2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_SMOD_3TOI">
<code class="descclassname">epr.</code><code class="descname">E_SMOD_3TOI</code><a class="headerlink" href="#epr.E_SMOD_3TOI" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="data">
<dt id="epr.E_SMOD_2TOF">
<code class="descclassname">epr.</code><code class="descname">E_SMOD_2TOF</code><a class="headerlink" href="#epr.E_SMOD_2TOF" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="scaling-methods">
<span id="index-11"></span><h3>Scaling Methods<a class="headerlink" href="#scaling-methods" title="Permalink to this headline">¶</a></h3>
<dl class="data">
<dt id="epr.E_SMID_NON">
<code class="descclassname">epr.</code><code class="descname">E_SMID_NON</code><a class="headerlink" href="#epr.E_SMID_NON" title="Permalink to this definition">¶</a></dt>
<dd><p>No scaling</p>
</dd></dl>
<dl class="data">
<dt id="epr.E_SMID_LIN">
<code class="descclassname">epr.</code><code class="descname">E_SMID_LIN</code><a class="headerlink" href="#epr.E_SMID_LIN" title="Permalink to this definition">¶</a></dt>
<dd><p>Linear pixel scaling</p>
<span class="target" id="index-12"></span></dd></dl>
<dl class="data">
<dt id="epr.E_SMID_LOG">
<code class="descclassname">epr.</code><code class="descname">E_SMID_LOG</code><a class="headerlink" href="#epr.E_SMID_LOG" title="Permalink to this definition">¶</a></dt>
<dd><p>Logarithmic pixel scaling</p>
<span class="target" id="index-13"></span></dd></dl>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">API Reference</a><ul>
<li><a class="reference internal" href="#classes">Classes</a><ul>
<li><a class="reference internal" href="#product">Product</a></li>
<li><a class="reference internal" href="#dataset">Dataset</a></li>
<li><a class="reference internal" href="#record">Record</a></li>
<li><a class="reference internal" href="#field">Field</a></li>
<li><a class="reference internal" href="#dsd">DSD</a></li>
<li><a class="reference internal" href="#band">Band</a></li>
<li><a class="reference internal" href="#raster">Raster</a></li>
<li><a class="reference internal" href="#eprtime">EPRTime</a></li>
</ul>
</li>
<li><a class="reference internal" href="#functions">Functions</a></li>
<li><a class="reference internal" href="#exceptions">Exceptions</a><ul>
<li><a class="reference internal" href="#eprerror">EPRError</a></li>
<li><a class="reference internal" href="#eprvalueerror">EPRValueError</a></li>
</ul>
</li>
<li><a class="reference internal" href="#data">Data</a><ul>
<li><a class="reference internal" href="#data-type-identifiers">Data type identifiers</a></li>
<li><a class="reference internal" href="#sample-models">Sample Models</a></li>
<li><a class="reference internal" href="#scaling-methods">Scaling Methods</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="gdal_export_example.html"
title="previous chapter">GDAL export example</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="NEWS.html"
title="next chapter">Change history</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/reference.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="NEWS.html" title="Change history"
>next</a> |</li>
<li class="right" >
<a href="gdal_export_example.html" title="GDAL export example"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">PyEPR 0.9.3.dev0 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011-2018, Antonio Valentino.
Last updated on Feb 26, 2018.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.7.
</div>
</body>
</html>
|