Zhao, Jun-Hui 
	
10:13 AM (5 minutes ago) On Thu, Sep 12, 2013
		
to BumHyun, smamiriad
> Are there some difference between SMA-miriad and other miriad version (i.e. carma) in Task 'INVERT' and 'UVLIN' ?

The latest SMA-miriad beta version was based on  early miriad_cvs version 4.1.3 in Nov 2009 when we implemented patches for
double-band while the latest carma version should be miriad_cvs version 4.3.5 or newer.

In addition, for the SMA-miriad beta, we added a routine (a debugging feature) to examine the headers prior to processing
the visibility in some of the tasks that involved handling uv data and were easy to be (often) collapsed in the end-to-end (e2e)
data handling routine (scripte) due to wrong header variables or badly calibrated spectral channel vis in the uv-data which were produced by
users with their own Miriad; some of them used very old versions of Miriad. The default for those tasks is only to handle uv data produced
from the e2e process with SMA-miriad beta. In the relevant tasks, options=nochk is given to disable this function. Other than that,
these tasks should be identical to those in miriad_cvs version 4.1.3 imported from carma CVS.

I checked, both invert and uvlin are among the tasks:

%uvlin
%help
....
Keyword: options
         This gives extra processing options. Several options can be given,
         each separated by commas. They may be abbreivated to the minimum
         needed to avoid ambiguity. Possible options are:
            sun         With this options, the OFFSET keyword is ignored,
                        and a shift appropriate for the Sun is determined
                        This can be useful to eliminate solar interference.
            twofit      If either the OFFSET parameter is set, or the SUN
                        option invoked, this options instructs UVLIN to
                        perform a simultaneous polynomial fit for a emission
                        both at the phase centre and at the appropriate
                        offset.
            nowindow    Normally uvlin processes the different windows separatel
                        This will usually give the best result when the differen
                        windows are at quite different frequencies. However when
                        the windows are at similar frequencies, or perhaps even
                        abutting, then it is better to perform a single fit over
                        all windows simultaneously. The "nowindow" option causes
                        uvlin to do a single fit over all windows.
            lpropc      The line shape is constant throughout the data-set,
                        and the intensity is proportional to the continuum
                        strength. This cannot be used together with
                        the "twofit" option.
            relax       Normally UVLIN attempts to avoid overfitting the
                        data by reducing the order of the fit. It does this
                        if a significant number of channels are flagged
                        (more than 40% bad) or if it believes there is
                        inadequate data to perform the fit (less than
                        5*(order+1) channels). You can overwrite this
                        conservatism, if you know what you are doing, with
                        the "relax" option.
         The following options can be used to turn off calibration corrections.
         The default is to apply any calibration present.
            nocal       Do not apply the gains table.
            nopass      Do not apply bandpass corrections. It is unwise
                        to turn off bandpass correction, as the continuum
                        estimation process will be confused by a bandpass
                        which is not flat.
            nopol       Do not apply polarization corrections.
            nochk       Diable head variable check (for SMA only).      <--
uvlin%


invert%
....
Keyword: options
         This gives extra processing options. Several options can be
         given (abbreviated to uniqueness), and separated by commas:
           nocal    Do not apply gains table calibration to the data.
           nopol    Do not apply polarisation leakage corrections.
           nopass   Do not apply bandpass table calibration to the data.
           double   Normally INVERT makes the beam patterns the same
                    size as the output image. This option causes the
                    beam patterns to be twice as large.
           systemp  Weight each visibility in inverse proportion to the
                    noise variance. Normally visibilities are weighted in
                    proportion to integration time. Weighting based on the
                    noise variance optimises the signal-to-noise ratio
                    (provided the measures of the system temperature are
                    reliable!).
           mfs      Perform multi-frequency synthesis. The causes all the
                    channel data to be used in forming a single map. The
                    frequency dependence of the uv coordinate is thus used to
                    give better uv coverage and/or avoid frequency
                    smearing. For this option to produce useful maps, the
                    intensity change over the frequency band must be small.
                    You should set the ``line'' parameter to select the
                    channels that you wish to grid.
           sdb      Generate the spectral dirty beam as well as the normal
                    beam, when MFS processing. The default is to only create
                    the normal beam. If the spectral dirty beam is created,
                    this is saved as an extra plane in the beam dataset.
           mosaic   Process multiple pointings, and generate a linear
                    mosaic of these pointings.
           imaginary Make imaginary image for non-Hermitian data (holography).
           amplitude Produce a image using the data amplitudes only. The
                     phases of the data are set to zero.
           phase     Produce an image using the data phase only. The amplitudes
                     of the data are set to 1.
           nochk   Diable head variable check (for SMA only).                             <--
....
invert%

Similar questions from users have been archived in a SMA Miriad webpage under the SMA website, for example,
http://www.cfa.harvard.edu/sma/miriad/download/QandA/GlenPetitpas2012jun28.html


>I guess that SMA-miriad has special functions and tasks in calibrations steps. Is it right?
    Yes, we have implemented many special features for handling interferometer array data at
submillimeter concerning the calibrators at submillimeters become weak (often run out S/N budget) for QSOs and/or
strong but resolved for solar planets, sophisticated SMA correlators, and many SMA data errors
due to frequently updated SMA online software since spring 2004. These features are coded in the SMA special programs with
prefix "sma". These programs are located in two special areas  in $MIRSRC/prog/sma and/or $SMASUBS in
both miriad_cvs and SMA beta distributions.
    JHZ

2013-Sep-13, JHZ: "$MIRSUBS" instead of "$SMASUBS" in the last sentence above.

On Thu, Sep 12, 2013 at 12:36 AM, BumHyun Lee  wrote:

    Dear Zhao, Jun-Hui
    I have another question related with SMA-miriad.
    Are there some difference between SMA-miriad and other miriad version (i.e. carma) in Task 'INVERT' and 'UVLIN' ?
    I mean that I am wondering if there is special function in Task 'INVERT' and 'UVLIN' of SMA-miriad.
    Usually, I do calibration steps in MIR_IDL and I do imaging steps in MIRIAD or AIPS.
    I guess that SMA-miriad has special functions and tasks in calibrations steps. Is it right?

    Thank you.
    Best regards,
    Bumhyun Lee  







    2013/8/15 BumHyun Lee 

        Dear Zhao, Jun-Hui
        Thank you for your kind answer.

        Best regards,
        Bumhyun Lee


        2013/8/2 Zhao, Jun-Hui 

            please download the SMA original data (not calibrated) from SMA archive 
            and follow the procedure for one of the examples given for the observing modes 
            that we have been supporting (see  http://www.cfa.harvard.edu/sma/miriad/spec/SMAscripts/).

            JHZ


            On Fri, Aug 2, 2013 at 4:51 AM, BumHyun Lee  wrote:

                Hi, my name is Bumhyun Lee.
                I tried to use 'sma_miriad' ubuntu version.
                However, I have some problem for some tasks.
                (i.e. uvlin & invert)
                Also, I find same problem of other user.
                http://www.cfa.harvard.edu/sma/miriad/download/QandA/cDedes29jul2011.html

                When I try to do uvlin task, I can see the error message : 

                uvlin vis=12n4522.miriad out=12n4522.lin order=1 chans=5,10,90,95 options=nowin
                UvLin: version beta 11jan10
                ### Fatal Error [uvlin]:

                And, when I try to do invert task, I can see no data after doing invert task.






                How can I fix these two problems?

                Could you give me a tip for these problem?


                Best regards,

                Bumhyun Lee