Build: #19 failed
Job: Test Tools MPI Many Linux 2.28 Rocky 8.10 Py3.10 failed
region text string: Test case result
The below summarizes the result of the test " region text string" in build 19 of CASA - CMake MPI - Test Tools MPI Many Linux 2.28 Rocky 8.10 Py3.10.
- Description
- region text string
- Test class
- tests.tools.regionmanager.test_tool_regionmanager.rg_frombcs_test
- Method
- test_region_text_string
- Duration
- < 1 sec
- Status
- Failed (Existing Failure)
Error Log
RuntimeError: RegularFile: /home/casatest/casa6/casatestutils/nosedir/test_tool_regionmanager/xxyy.im/mask0/table.dat_tmp does not exist and cannot be created
self = <test_tool_regionmanager.rg_frombcs_test testMethod=test_region_text_string>
def test_region_text_string(self):
"""Test setting a region text string"""
region = "box[[1pix,2pix],[3pix,4pix]]\nbox[[5pix,6pix],[7pix,8pix]]\nbox[[9pix,10pix],[11pix,12pix]]"
myreg = self.run_frombcs(
self.image, "", "", "", "a", region
)
myia = iatool()
myia.open(self.image)
> subi = myia.subimage("xxyy.im", region=myreg)
../../../casatools/tests/tools/regionmanager/test_tool_regionmanager.py:542:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../../venv/lib/python3.10/site-packages/casatools/image.py:3890: in subimage
return _wrap_image(swig_object=self._swigobj.subimage(outfile, region, mask, dropdeg, overwrite, list, stretch, wantreturn, keepaxes))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <casatools.__casac__.image.image; proxy of <Swig Object of type 'casac::image *' at 0x7f78ca107660> >
args = ('xxyy.im', {'comment': '', 'isRegion': 2, 'name': 'WCUnion', 'regions': {'*1': {'absrel': 1, 'comment': '', 'coordina...bserver': 'unavailable', 'pixelmap0': array([0, 1]), ...}, 'isRegion': 2, ...}, 'nr': 3}}, '', False, False, True, ...)
kwargs = {}
def subimage(self, *args, **kwargs):
"""
subimage(self, _outfile, _region, _mask, _dropdeg, _overwrite, _list, _stretch, _wantreturn, _keepaxes) -> image
Summary:
Create a (sub)image from a region of the image
Description:
This function copies all or part of the image to another on-the-fly Image tool.
Both float and complex valued images are supported.
If {stfaf outfile} is given, the subimage is written to the specified
disk file. If {stfaf outfile} is unset, the returned Image tool actually
references the input image file (i.e. that associated with the Image
tool to which you are applying this function). So if you deleted the
input image disk file, it would render this tool useless. When you
destroy this tool (with the done function)
the reference connection is broken.
Sometimes it is useful to drop axes of length one (degenerate axes).
Use the {stfaf dropdeg} argument if you want to do this. Further control
is provided via the keepaxes parameter. If dropdeg=True, you may specify
a list of degenerate axes to keep in the keep axes parameter. This allows
you to drop only a subset of degenerate axes. This parameter is ignored if
dropdeg=False. If dropdeg=True, all degenerate axes are dropped if keepaxes
is set to an empty list (this is the default behavior). Nondegenerate
axes are implicitly kept, even if they are included in the keepaxes list.
The output mask is the combination (logical OR) of the default input
pixelmask (if any) and the OTF mask. Any other input pixelmasks
will not be copied. Use function maskhandler if you
need to copy other masks too.
If the mask has fewer dimensions than the image and if the shape
of the dimensions the mask and image have in common are the same,
the mask will automatically have the missing dimensions added so
it conforms to the image.
If stretch is true and if the number of mask dimensions is less than
or equal to the number of image dimensions and some axes in the
mask are degenerate while the corresponding axes in the image are not,
the mask will be stetched in the degenerate dimensions. For example,
if the input image has shape [100, 200, 10] and the input
mask has shape [100, 200, 1] and stretch is true, the mask will be
stretched along the third dimension to shape [100, 200, 10]. However if
the mask is shape [100, 200, 2], stretching is not possible and an
error will result.
Input Parameters:
outfile Output image file name. Default is unset.
region Region selection. Default is to use the full image.
mask Mask to use. Default is none.
dropdeg Drop degenerate axes
overwrite Overwrite (unprompted) pre-existing output file?
list List informative messages to the logger
stretch Stretch the mask if necessary and possible?
wantreturn Return an image analysis tool attached to the created subimage
keepaxes If dropdeg=True, these are the degenerate axes to keep. Nondegenerate axes are implicitly always kept.
Example:
#
print 't----t subimage Ex 1 t----'
ia.maketestimage('myfile',overwrite=true)
im2 = ia.subimage() # a complete copy
r1 = rg.box([10,10],[30,40],[5,5]) # A strided pixel box region
im3 = ia.subimage(outfile='/tmp/foo', region=r1, overwrite=true)
# Explicitly named subimage
im2.done()
im3.done()
ia.close()
#
# As an example of the usage of the keepaxes parameter, consider an image
# that has axes RA, Dec, Stokes, and Freq. The Stokes and Freq axes are both
# degenerate while the RA and Dec axes are not, and it is desired to make a
# subimage in which the Stokes axis is discarded. The following command will
# accomplish that.
ia.open('my.im')
subim = ia.subimage(outfile='discarded_stokes.im', dropdeg=True, keepaxes=[3])
ia.done()
subim.done()
--------------------------------------------------------------------------------
"""
> return _image.image_subimage(self, *args, **kwargs)
E RuntimeError: RegularFile: /home/casatest/casa6/casatestutils/nosedir/test_tool_regionmanager/xxyy.im/mask0/table.dat_tmp does not exist and cannot be created
../../../../venv/lib/python3.10/site-packages/casatools/__casac__/image.py:7946: RuntimeError