Debian Codegraph @

test/pytest_upsample.py

raw symbols SCIP
1 ###############################################################################
2 # pytest_upsample.py: 5 m)
3 # Author(s): [email protected]
4 # Copyright (c) 2016-2019 European Union (Joint Research Centre)
5 # License EUPLv1.2
6 #
7 # This file is part of jiplib
8 ###############################################################################
9
10 # History
11 # 2017/10/23 - Created by Pieter Kempeneers ([email protected])
12 # Change log
13
14
15 import argparse
16 import os
17 import jiplib as jl
18
19 parser=argparse.ArgumentParser()
20 parser.add_argument("-input","--input",help="Path of the input file",dest="input",required=True,type=str)
21 args = parser.parse_args()
22
23 jim0=jl.createJim(filename=args.input,noread=True)
24 ULX=jim0.getUlx()
25 ULY=jim0.getUly()
26 LRX=ULX+1000
27 LRY=ULY-1000
28 jim0.close()
29 jim0=jl.createJim(filename=args.input,ulx=ULX,uly=ULY,lrx=LRX,lry=LRY,dx=5,dy=5)
30 if jim0.nrOfCol() != 200:
31 print("Failed: createJim with upsample")
32 elif jim0.nrOfRow() != 200:
33 print("Failed: createJim with upsample")
34 else:
35 print("Success: createJim with upsample")
36 jim0.close()
37