Commits
407 407 | elif spkernel in ['boxcar', 'gaussian']: |
408 408 | return True |
409 409 | else: |
410 410 | raise ValueError(f'Unsupported spectral smoothing kernel, {spkernel}', 'SEVERE') |
411 411 | |
412 412 | |
413 413 | class ImsmoothParams(AbstractValidatable): |
414 414 | """Parameter manipulation class for execution of casatasks.imsmooth.""" |
415 415 | |
416 416 | FIXED_PARAM = dict( |
417 - | TARGETRES=False, |
418 - | MASK='', |
419 - | BEAM={}, |
420 - | REGION='', |
421 - | BOX='', |
422 - | CHANS='', |
423 - | STOKES='', |
424 - | STRETCH=False, |
425 - | OVERWRITE=True |
417 + | targetres=False, |
418 + | mask='', |
419 + | beam={}, |
420 + | region='', |
421 + | box='', |
422 + | chans='', |
423 + | stokes='', |
424 + | stretch=False, |
425 + | overwrite=True |
426 426 | ) |
427 427 | |
428 428 | def __init__(self, infile: str=None, outfile: str=None, dirkernel: str='none', major: str='', minor: str='', pa: str='', |
429 429 | kimage: str='', scale: int=-1.0) -> None: |
430 430 | self.infile = infile |
431 431 | self.outfile = outfile |
432 432 | self.kernel = dirkernel if dirkernel is not None else 'none' # none(default)/gaussian/boxcar/image |
433 433 | self.major = major if major is not None else '' # dirkernel = gaussian/boxcar |
434 434 | self.minor = minor if minor is not None else '' # dirkernel = gaussian/boxcar |
435 435 | self.pa = pa if pa is not None else '' # dirkernel = gaussian/boxcar |
457 457 | __log_origin is for callabletask.log_origin_setter |
458 458 | """ |
459 459 | return dict(self.FIXED_PARAM, imagename=self.infile, kernel=self.kernel, major=self.major, minor=self.minor, pa=self.pa, |
460 460 | kimage=self.kimage, scale=self.scale, outfile=self.outfile, __log_origin='imbaseline') |
461 461 | |
462 462 | |
463 463 | class SdsmoothParams(AbstractValidatable): |
464 464 | """Parameter manipulation class for execution of casatasks.sdsmooth.""" |
465 465 | |
466 466 | FIXED_PARAM = dict( |
467 - | SPW='', |
468 - | FIELD='', |
469 - | ANTENNA='', |
470 - | TIMERANGE='', |
471 - | SCAN='', |
472 - | POL='', |
473 - | INTENT='', |
474 - | REINDEX=True, |
475 - | OVERWRITE=True |
467 + | spw='', |
468 + | field='', |
469 + | antenna='', |
470 + | timerange='', |
471 + | scan='', |
472 + | pol='', |
473 + | intent='', |
474 + | reindex=True, |
475 + | overwrite=True |
476 476 | ) |
477 477 | |
478 478 | def __init__(self, infile: str=None, outfile: str=None, datacolumn: str=None, spkernel: str='none', kwidth: int=5) -> None: |
479 479 | self.infile = infile |
480 480 | self.outfile = outfile |
481 481 | self.datacolumn = datacolumn |
482 482 | self.kernel = spkernel if spkernel is not None else 'none' # none(default)/gaussian/boxcar |
483 483 | self.kwidth = kwidth if kwidth is not None else 5 # gaussian/boxcar |
484 484 | self.validate() |
485 485 | |
498 498 | __log_origin is for sdutil.callabletask_decorator. |
499 499 | """ |
500 500 | return dict(self.FIXED_PARAM, infile=self.infile, datacolumn=self.datacolumn, kernel=self.kernel, kwidth=self.kwidth, |
501 501 | outfile=self.outfile, __log_origin='imbaseline') |
502 502 | |
503 503 | |
504 504 | class SdbaselineParams(AbstractValidatable): |
505 505 | """Parameter manipulation class for execution of casatasks.sdbaseline.""" |
506 506 | |
507 507 | FIXED_PARAM = dict( |
508 - | ANTENNA='', |
509 - | FIELD='', |
510 - | SPW='', |
511 - | TIMERANGE='', |
512 - | SCAN='', |
513 - | POL='', |
514 - | INTENT='', |
515 - | REINDEX=True, |
516 - | BLMODE='fit', |
517 - | DOSUBTRACT=True, |
518 - | BLFORMAT='csv', |
519 - | BLTABLE='', |
520 - | UPDATEWEIGHT=False, |
521 - | SIGMAVALUE='stddev', |
522 - | SHOWPROGRESS=False, |
523 - | MINNROW=1000, |
524 - | FFTMETHOD='fft', |
525 - | VERBOSE=False, |
526 - | OVERWRITE=True |
508 + | antenna='', |
509 + | field='', |
510 + | spw='', |
511 + | timerange='', |
512 + | scan='', |
513 + | pol='', |
514 + | intent='', |
515 + | reindex=True, |
516 + | blmode='fit', |
517 + | dosubtract=True, |
518 + | blformat='csv', |
519 + | bltable='', |
520 + | updateweight=False, |
521 + | sigmavalue='stddev', |
522 + | showprogress=False, |
523 + | minnrow=1000, |
524 + | fftmethod='fft', |
525 + | verbose=False, |
526 + | overwrite=True |
527 527 | ) |
528 528 | |
529 529 | def __init__(self, infile: str=None, outfile: str=None, datacolumn: str=None, bloutput: str='', maskmode: str='list', |
530 530 | chans: str='', thresh: float=5.0, avg_limit: int=4, minwidth: int=4, edge: List[int]=[0, 0], blfunc: str='poly', |
531 531 | order: int=5, npiece: int=3, applyfft: bool=True, fftthresh: float=3.0, addwn: List=[0], rejwn: List=[], |
532 532 | blparam: str='', clipniter: int=0, clipthresh: float=3.0) -> None: |
533 533 | self.infile = infile |
534 534 | self.outfile = outfile |
535 535 | self.datacolumn = datacolumn |
536 536 | self.bloutput = bloutput if bloutput is not None else '' |