Skip to main content
Back to top
Ctrl
+
K
Choose version
Overview
User guide
Parameters
API Reference
Search
Ctrl
+
K
GitHub
ptypy.org
Search
Ctrl
+
K
Overview
User guide
Parameters
API Reference
GitHub
ptypy.org
Section Navigation
Core Functionalities
ptypy.core.classes
ptypy.core.classes.get_class
ptypy.core.classes.shift
ptypy.core.classes.valid_ID
ptypy.core.classes.Base
ptypy.core.classes.Container
ptypy.core.classes.POD
ptypy.core.classes.Storage
ptypy.core.classes.View
ptypy.core.ptycho
ptypy.core.ptycho.Ptycho
ptypy.core.data
ptypy.core.data.MoonFlowerScan
ptypy.core.data.PtyScan
ptypy.core.data.PtydScan
ptypy.core.data.QuickScan
ptypy.core.manager
ptypy.core.manager.BlockFull
ptypy.core.manager.BlockGradFull
ptypy.core.manager.BlockOPRModel
ptypy.core.manager.BlockScanModel
ptypy.core.manager.BlockVanilla
ptypy.core.manager.Bragg3dModel
ptypy.core.manager.Full
ptypy.core.manager.GradFull
ptypy.core.manager.ModelManager
ptypy.core.manager.OPRModel
ptypy.core.manager.ScanModel
ptypy.core.manager.Vanilla
ptypy.core.save_load
ptypy.core.save_load.from_h5
ptypy.core.save_load.link
ptypy.core.save_load.to_h5
ptypy.core.save_load.unlink
ptypy.core.paths
ptypy.core.paths.Paths
ptypy.core.geometry
ptypy.core.geometry.get_propagator
ptypy.core.geometry.translate_to_pix
ptypy.core.geometry.BasicFarfieldPropagator
ptypy.core.geometry.BasicNearfieldPropagator
ptypy.core.geometry.FFTchooser
ptypy.core.geometry.Geo
ptypy.core.illumination
ptypy.core.illumination.aperture
ptypy.core.illumination.init_storage
ptypy.core.sample
ptypy.core.sample.init_storage
ptypy.core.sample.simulate
ptypy.core.xy
ptypy.core.xy.augment_to_coordlist
ptypy.core.xy.from_pars
ptypy.core.xy.raster_scan
ptypy.core.xy.round_scan
ptypy.core.xy.spiral_scan
Reconstruction Engines
ptypy.engines.base
ptypy.engines.base.Base3dBraggEngine
ptypy.engines.base.BaseEngine
ptypy.engines.base.PositionCorrectionEngine
ptypy.engines.utils
ptypy.engines.utils.Cdot
ptypy.engines.utils.Cnorm2
ptypy.engines.utils.basic_fourier_update
ptypy.engines.utils.basic_fourier_update_LEGACY
ptypy.engines.utils.dynamic_load
ptypy.engines.utils.log_likelihood
ptypy.engines.utils.projection_update_DM_AP
ptypy.engines.utils.projection_update_generalized
ptypy.engines.utils.reduce_dimension
ptypy.engines.posref
ptypy.engines.posref.AnnealingRefine
ptypy.engines.posref.GridSearchRefine
ptypy.engines.posref.PositionRefine
ptypy.engines.projectional
ptypy.engines.projectional.DM
ptypy.engines.projectional.DMMixin
ptypy.engines.projectional.RAAR
ptypy.engines.projectional.RAARMixin
ptypy.engines.stochastic
ptypy.engines.stochastic.EPIE
ptypy.engines.stochastic.EPIEMixin
ptypy.engines.stochastic.SDR
ptypy.engines.stochastic.SDRMixin
ptypy.engines.ML
ptypy.engines.ML.prepare_smoothing_preconditioner
ptypy.engines.ML.BaseModel
ptypy.engines.ML.EuclidModel
ptypy.engines.ML.GaussianModel
ptypy.engines.ML.ML
ptypy.engines.ML.PoissonModel
ptypy.engines.ML.Regul_del2
ptypy.engines.Bragg3d_engines
ptypy.engines.Bragg3d_engines.DM_3dBragg
ptypy.custom.DMOPR
ptypy.custom.DMOPR.DMOPR
ptypy.custom.MLOPR
ptypy.custom.MLOPR.MLOPR
ptypy.custom.DM_object_regul
ptypy.custom.DM_object_regul.DM_object_regul
ptypy.custom.WASP
ptypy.custom.WASP.WASP
ptypy.custom.ePIE_parallel
ptypy.custom.ePIE_parallel.EPIEParallel
ptypy.custom.threepie
ptypy.custom.threepie.ThreePIE
Data Loaders
ptypy.experiment.hdf5_loader
ptypy.experiment.hdf5_loader.Hdf5Loader
ptypy.experiment.hdf5_loader.Hdf5LoaderFast
ptypy.experiment.swmr_loader
ptypy.experiment.swmr_loader.SwmrLoader
ptypy.experiment.diamond_nexus
ptypy.experiment.diamond_nexus.DiamondNexus
ptypy.experiment.diamond_streaming
ptypy.experiment.diamond_streaming.DiamondZMQLoader
ptypy.experiment.epsic_loader
ptypy.experiment.epsic_loader.EpsicHdf5Loader
ptypy.experiment.epsic_loader.EpsicHdf5LoaderFast
ptypy.experiment.nanomax
ptypy.experiment.nanomax.NanomaxContrast
ptypy.experiment.nanomax.NanomaxFlyscanDec2019
ptypy.experiment.nanomax.NanomaxFlyscanMay2019
ptypy.experiment.nanomax.NanomaxStepscanNov2018
ptypy.experiment.nanomax.NanomaxStepscanSep2019
ptypy.experiment.nanomax3d
ptypy.experiment.nanomax3d.NanomaxBraggJune2017
ptypy.experiment.nanomax_streaming
ptypy.experiment.nanomax_streaming.decompress
ptypy.experiment.nanomax_streaming.NanomaxZmqScan
ptypy.experiment.ALS_5321
ptypy.experiment.ALS_5321.ALS5321Scan
ptypy.experiment.AMO_LCLS
ptypy.experiment.AMO_LCLS.AMOScan
ptypy.experiment.DiProI_FERMI
ptypy.experiment.DiProI_FERMI.DiProIFERMIScan
ptypy.experiment.ID16Anfp
ptypy.experiment.ID16Anfp.undistort
ptypy.experiment.ID16Anfp.ID16AScan
ptypy.experiment.cSAXS
ptypy.experiment.cSAXS.get_data_object
ptypy.experiment.cSAXS.get_data_path
ptypy.experiment.cSAXS.get_mask_path
ptypy.experiment.cSAXS.get_position_path
ptypy.experiment.cSAXS.get_positions
ptypy.experiment.cSAXS.cSAXSScan
ptypy.experiment.spec
ptypy.experiment.spec.verbose
ptypy.experiment.spec.SpecInfo
ptypy.experiment.spec.SpecScan
ptypy.experiment.UCL
ptypy.experiment.UCL.UCLLaserScan
ptypy.experiment.optiklabor
ptypy.experiment.optiklabor.FliSpecScanMultexp
ptypy.experiment.plugin
ptypy.experiment.plugin.makeScanPlugin
ptypy.experiment.savu
ptypy.experiment.savu.Savu
ptypy.experiment.spec
ptypy.experiment.spec.verbose
ptypy.experiment.spec.SpecInfo
ptypy.experiment.spec.SpecScan
Input/Output
ptypy.io.edfIO
ptypy.io.edfIO.convertStr
ptypy.io.edfIO.edfread
ptypy.io.edfIO.readData
ptypy.io.edfIO.readHeader
ptypy.io.edfIO.writeData
ptypy.io.h5rw
ptypy.io.h5rw.h5append
ptypy.io.h5rw.h5info
ptypy.io.h5rw.h5read
ptypy.io.h5rw.h5write
ptypy.io.h5rw.sdebug
ptypy.io.h5rw.Str_to_Slice
ptypy.io.json_rw
ptypy.io.json_rw.jread
ptypy.io.json_rw.json_numpy_obj_hook
ptypy.io.json_rw.jwrite
ptypy.io.json_rw.NumpyEncoder
ptypy.io.json_rw.Str_to_Slice
ptypy.io.rawIO
ptypy.io.rawIO.rawread
ptypy.io.imageIO
ptypy.io.imageIO.imread
ptypy.io.imageIO.readHeader
ptypy.io.image_read
ptypy.io.interaction
ptypy.io.interaction.DEBUG
ptypy.io.interaction.ID_generator
ptypy.io.interaction.is_str
ptypy.io.interaction.numpy_replace
ptypy.io.interaction.numpy_zmq_recv
ptypy.io.interaction.numpy_zmq_send
ptypy.io.interaction.Client
ptypy.io.interaction.NumpyEncoder
ptypy.io.interaction.Server
Utilities
ptypy.utils.array_utils
ptypy.utils.array_utils.c_zoom
ptypy.utils.array_utils.crop_pad
ptypy.utils.array_utils.crop_pad_axis
ptypy.utils.array_utils.crop_pad_symmetric_2d
ptypy.utils.array_utils.ellipsis
ptypy.utils.array_utils.fill3D
ptypy.utils.array_utils.grids
ptypy.utils.array_utils.mirror
ptypy.utils.array_utils.pad_lr
ptypy.utils.array_utils.rebin
ptypy.utils.array_utils.rebin_2d
ptypy.utils.array_utils.rectangle
ptypy.utils.array_utils.shift_zoom
ptypy.utils.array_utils.switch_orientation
ptypy.utils.array_utils.zoom
ptypy.utils.math_utils
ptypy.utils.math_utils.abs2
ptypy.utils.math_utils.cabs2
ptypy.utils.math_utils.delxb
ptypy.utils.math_utils.delxc
ptypy.utils.math_utils.delxf
ptypy.utils.math_utils.gauss_fwhm
ptypy.utils.math_utils.gaussian
ptypy.utils.math_utils.gaussian2D
ptypy.utils.math_utils.gf
ptypy.utils.math_utils.gf_2d
ptypy.utils.math_utils.norm
ptypy.utils.math_utils.norm2
ptypy.utils.math_utils.ortho
ptypy.utils.math_utils.rl_deconvolution
ptypy.utils.math_utils.smooth_step
ptypy.utils.misc
ptypy.utils.misc.all_subclasses
ptypy.utils.misc.clean_path
ptypy.utils.misc.complex_overload
ptypy.utils.misc.electron_wavelength
ptypy.utils.misc.expect2
ptypy.utils.misc.expect3
ptypy.utils.misc.expectN
ptypy.utils.misc.isstr
ptypy.utils.misc.keV2m
ptypy.utils.misc.keV2nm
ptypy.utils.misc.m2keV
ptypy.utils.misc.nm2keV
ptypy.utils.misc.str2index
ptypy.utils.misc.str2int
ptypy.utils.misc.str2range
ptypy.utils.misc.unique_path
ptypy.utils.misc.Table
ptypy.utils.parallel
ptypy.utils.parallel.MPImax
ptypy.utils.parallel.MPImin
ptypy.utils.parallel.MPInoise2d
ptypy.utils.parallel.MPIprod
ptypy.utils.parallel.MPIrand_normal
ptypy.utils.parallel.MPIrand_uniform
ptypy.utils.parallel.MPIsum
ptypy.utils.parallel.allgather_dict
ptypy.utils.parallel.allreduce
ptypy.utils.parallel.allreduceC
ptypy.utils.parallel.barrier
ptypy.utils.parallel.bcast
ptypy.utils.parallel.bcast_dict
ptypy.utils.parallel.gather_dict
ptypy.utils.parallel.gather_list
ptypy.utils.parallel.receive
ptypy.utils.parallel.send
ptypy.utils.parallel.useMPI
ptypy.utils.parallel.LoadManager
ptypy.utils.parameters
ptypy.utils.parameters.asParam
ptypy.utils.parameters.format_standard_param
ptypy.utils.parameters.load
ptypy.utils.parameters.make_default
ptypy.utils.parameters.param_from_json
ptypy.utils.parameters.param_from_yaml
ptypy.utils.parameters.validate_standard_param
ptypy.utils.parameters.Param
ptypy.utils.plot_client
ptypy.utils.plot_client.figure_from_ptycho
ptypy.utils.plot_client.figure_from_ptyr
ptypy.utils.plot_client.spawn_MPLClient
ptypy.utils.plot_client.Bragg3dClient
ptypy.utils.plot_client.MPLClient
ptypy.utils.plot_client.MPLplotter
ptypy.utils.plot_client.PlotClient
ptypy.utils.plot_utils
ptypy.utils.plot_utils.HSV_to_P1A
ptypy.utils.plot_utils.HSV_to_RGB
ptypy.utils.plot_utils.P1A_to_HSV
ptypy.utils.plot_utils.RGB_to_HSV
ptypy.utils.plot_utils.complex2hsv
ptypy.utils.plot_utils.complex2rgb
ptypy.utils.plot_utils.franzmap
ptypy.utils.plot_utils.hsv2complex
ptypy.utils.plot_utils.hsv2rgb
ptypy.utils.plot_utils.imload
ptypy.utils.plot_utils.imsave
ptypy.utils.plot_utils.length_units
ptypy.utils.plot_utils.plot_data
ptypy.utils.plot_utils.plot_storage
ptypy.utils.plot_utils.pretty_length
ptypy.utils.plot_utils.rgb2complex
ptypy.utils.plot_utils.rgb2hsv
ptypy.utils.plot_utils.rmphaseramp
ptypy.utils.plot_utils.PtyAxis
ptypy.utils.scripts
ptypy.utils.scripts.cxro_iref
ptypy.utils.scripts.diversify
ptypy.utils.scripts.hdr_image
ptypy.utils.scripts.load_from_ptyr
ptypy.utils.scripts.mass_center
ptypy.utils.scripts.phase_from_dpc
ptypy.utils.scripts.png2mpg
ptypy.utils.scripts.radial_distribution
ptypy.utils.scripts.remove_hot_pixels
ptypy.utils.scripts.stxm_analysis
ptypy.utils.scripts.stxm_init
ptypy.utils.scripts.xradia_star
ptypy.utils.descriptor
ptypy.utils.descriptor.ArgParseDescriptor
ptypy.utils.descriptor.CODES
ptypy.utils.descriptor.Descriptor
ptypy.utils.descriptor.EvalDescriptor
ptypy.utils.verbose
ptypy.utils.verbose.get_level
ptypy.utils.verbose.headerline
ptypy.utils.verbose.ilog_message
ptypy.utils.verbose.ilog_newline
ptypy.utils.verbose.ilog_streamer
ptypy.utils.verbose.log
ptypy.utils.verbose.report
ptypy.utils.verbose.set_level
ptypy.utils.verbose.CustomFormatter
ptypy.utils.verbose.LogTime
ptypy.utils.verbose.MPIFilter
ptypy.debug.embedded_shell
ptypy.debug.embedded_shell.ipshell
ptypy.debug.ipython_kernel
ptypy.debug.ipython_kernel.start_ipython_kernel
ptypy.debug.ipython_kernel.IPythonKernelThread
ptypy.simulations.detector
ptypy.simulations.detector.conv
ptypy.simulations.detector.expect2
ptypy.simulations.detector.fill2D
ptypy.simulations.detector.shot
ptypy.simulations.detector.smooth_step
ptypy.simulations.detector.Detector
ptypy.simulations.ptysim_utils
ptypy.simulations.ptysim_utils.augment_to_coordlist
ptypy.simulations.ptysim_utils.czoom
ptypy.simulations.ptysim_utils.exp_positions
ptypy.simulations.simscan
ptypy.simulations.simscan.SimScan
ptypy.resources
ptypy.resources.flower_obj
ptypy.resources.moon_pr
ptypy.resources.tree_obj
API Reference
Utilities
ptypy.utils.array_utils
ptypy.utils.array_utils.rectangle
ptypy.utils.array_utils.rectangle
#
ptypy.utils.array_utils.
rectangle
(
grids
,
dims
=
None
,
ew
=
2
)
#
On this page
rectangle()