Commits

Benjamin Bean authored bd910570621 Merge
Merge branch 'CAS-6692' of https://open-bitbucket.nrao.edu/scm/casa/casa6 into CAS-6692
No tags

casatasks/src/private/imagerhelpers/_gclean.py

Modified
1 +########################################################################3
2 +# _gclean.py
3 +#
4 +# Copyright (C) 2021,2022
5 +# Associated Universities, Inc. Washington DC, USA.
6 +#
7 +# This script is free software; you can redistribute it and/or modify it
8 +# under the terms of the GNU Library General Public License as published by
9 +# the Free Software Foundation; either version 2 of the License, or (at your
10 +# option) any later version.
11 +#
12 +# This library is distributed in the hope that it will be useful, but WITHOUT
13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 +# License for more details.
16 +#
17 +# You should have received a copy of the GNU Library General Public License
18 +# along with this library; if not, write to the Free Software Foundation,
19 +# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
20 +#
21 +# Correspondence concerning AIPS++ should be adressed as follows:
22 +# Internet email: aips2-request@nrao.edu.
23 +# Postal address: AIPS++ Project Office
24 +# National Radio Astronomy Observatory
25 +# 520 Edgemont Road
26 +# Charlottesville, VA 22903-2475 USA
27 +#
1 28 import os
2 29 import asyncio
3 30 from functools import reduce
4 31 import copy
5 32
6 33 # from casatasks.private.imagerhelpers._gclean import gclean
7 34 class gclean:
8 35 '''gclean(...) creates a stream of convergence records which indicate
9 36 the convergence quaility of the tclean process. The initial record
10 37 describes the initial dirty image.
207 234 raise StopAsyncIteration
208 235
209 236 async def __anext__( self ):
210 237 loop = asyncio.get_event_loop( )
211 238 return await loop.run_in_executor( None, self.__reflect_stop )
212 239
213 240 def __iter__( self ):
214 241 return self
215 242
216 243 def __aiter__( self ):
217 - return self
244 + return self

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut