ACES-CMZ / reduction_ACES

Reduction scripts and tools for ACES
https://worldwidetelescope.org/webclient/?wtml=https://data.rc.ufl.edu/pub/adamginsburg/ACES/mosaics/mosaics.wtml
15 stars 12 forks source link

Execution Block ID uid://A001/X15a0/X192 Sgr_A_st_ao_03_7M [brick] #6

Open ashleythomasbarnes opened 2 years ago

ashleythomasbarnes commented 2 years ago

Sgr_A_st_ao_03_7M uid://A001/X15a0/X192

Product Links:

Reprocessed Product Links:

ashleythomasbarnes commented 2 years ago

HCO+

Screenshot 2021-11-15 at 14 20 02

HNCO

Screenshot 2021-11-15 at 14 20 07

keflavich commented 2 years ago

Probable SiO v=1 J=2-1 maser: image

xinglunju commented 2 years ago

QA summary & issues

Continuum

Cubes

keflavich commented 2 years ago

Thanks @xinglunju . For the "needs recalibration" step, we need to add that to the to-do list. I'll do that, but please have a look and see if you agree with it:

xinglunju commented 2 years ago

@keflavich Yes I agree. At least we need to double check the calibration and flagging of spws 20 & 22 in this EB, in the end we may simply flag these two spws instead of re-running calibration.

keflavich commented 2 years ago

Options:

  1. Flag out those two windows in that EB
  2. Attempt re-calibration
  3. Request re-calibration by ALMA (QA3)
thusharags commented 2 years ago

Here is a link to the Liszt paper on the potential absorption issue: https://ui.adsabs.harvard.edu/abs/2018A&A...610A..49L/abstract

xinglunju commented 2 years ago

@thusharags thanks, Thushara! But the first two EBs were observed on the same day and used the same calibrators, while the second EB is all good...

keflavich commented 2 years ago

This calibrator does look pretty weird. This is spw20 for the bad one (from tsys): image

These are good ones: image image image

All of these spectra look weird (they have lines in the window), but it's interesting that the last one got the right flux scale, while the first did not.

keflavich commented 2 years ago

Also interesting that tsysflag seems to have handled these lines right, though, which makes it less obvious why that one EB was messed up.

thusharags commented 2 years ago

Does anyone know what the threshold is for flagging line channels in the tsys cal table? Wonder whether the rogue dataste just missed that threshold by a bit? Unlikely though given how strong these lines are in the narrow window.

keflavich commented 2 years ago

@thusharags look at https://data.rc.ufl.edu/secure/adamginsburg/ACES/weblogs/humanreadable/Sgr_A_st_ao_03_7M/html/t2-4m.html?sidebar=sidebar_stage7&ms=all&subpage=t2-4m_details.html. The rogue data set did properly flag out the lines.

xinglunju commented 2 years ago

I checked calibrated data, and spw 20 of J1744 does show HCO+ absorption features in all the four EBs. See plots below. Screenshot from 2022-01-14 14-51-11 Screenshot from 2022-01-14 14-51-33 Screenshot from 2022-01-14 14-51-51 Screenshot from 2022-01-14 14-52-07

The phase calibration of spw 20 and 22 of the first EB (X738b) doesn't seem good, with large phase scatters in the last four scans. Screenshot from 2022-01-14 14-57-31 Screenshot from 2022-01-14 14-57-42

For a comparison, the next two plots show the calibrated phase for the second EB (X784b), which seems good. Screenshot from 2022-01-14 14-58-03 Screenshot from 2022-01-14 14-57-56

The calibrated amplitude of J1744 of X738b is messed up. The last four scans have clearly wrong amplitudes. This is likely the root of the abnormal flux of J1744 in this EB. Screenshot from 2022-01-14 14-56-14 Screenshot from 2022-01-14 14-56-23

ksi85 commented 2 years ago

Hi all,

I contacted ESO about the flux issue of the phase calibrator in the first measurement set and they suggested that the problem could lie with the used reference antenna. So they suggest to re-run the calibration with reference antenna CM03 instead of CM10 and then check if the calibration improved. If this is not the case, the DRM and me will investigate further.

keflavich commented 2 years ago

Suggested solutions:

Origin of problem (discussed on telecon):

xinglunju commented 2 years ago

Update: I added a flag in the 'flagtemplate.txt' file to flag the problematic scans in the first EB (spw id 20 & 22, scan id 8~19), and reran the whole pipeline. The result looks promising. Task 16 hifa_gfluxscale now shows consistent fluxes for J1744. The imaging rms for the target does not significantly change: spw 20 before vs. after flagging -- 74/60/87 vs. 80/67/92 mJy/beam (RMS/RMSmin/RMSmax). Will add more info soon...

keflavich commented 2 years ago

@ksi85 will you contact the helpdesk and ask if they can update the flagcommands?

ksi85 commented 2 years ago

Yes, I will contact the DRM tomorrow to ask if the flagcommands can be updated accordingly and then report back on what she says.

xinglunju commented 2 years ago

@ksi85 thank you! Here is what I did: In package_path/calibration/uid___A002_Xf1ecdeX738b.flagtemplate.txt (or in SBid*_auxproducts.tgz, which is a tarball that contains this txt file), add a new flag: mode='manual' spw='20,22' scan='8~19' reason='QA3:timegaincal_amplitude_time'

ksi85 commented 2 years ago

Hi all, this is the answer I got from the DRM about the procedure on if/how to get the data in the archive corrected:

The only way to request the correction of the results in the archive is through a QA3 procedure via HD. You need to describe the problem and request that the archived data should be corrected. I will then open a PRTSPR ticket with your request and documentation. The assignee will decide if this is needed or not. If it will be accepted, then we will go through QA3. If you really want these data corrected in the archive, send the request today, because due to the Feb shutdown there is some chance that the QA3 procedure will be accepted. In normal operation, this will not be corrected because the reference spw is not affected.

I am very busy today so I don't think I will get to writing the HD message. Can someone else take care of this if you think that it would be useful to have the corrected data in the archive? Thanks!

xinglunju commented 2 years ago

I can submit the ticket. Shall I send it to EU ARC (who are supposed to support this project)?

ksi85 commented 2 years ago

Thank you! Yes, this would be the right ARC :-)

xinglunju commented 2 years ago

Oops... my ALMA science portal/helpdesk account was affiliated with the EA ARC so I could only submit tickets to EA. I just changed the preferred ARC to EU, but still I only see EA options in the helpdesk. As far as I remember, the change of preferred ARCs itself is a ticket that needs to be approved by ARC staff. So probably I cannot do it today...

If someone else can do it today, that would be great. I will post a draft message here asap with all the details. Otherwise I will try it tomorrow once the change of the preferred ARC is approved.

xinglunju commented 2 years ago

It seems that my account has been switched to EU, so I've submitted a ticket:

Dear ARC staff,

I am working on the delivered data of the cycle 8 large program 2021.1.00172.L as a co-I, and I noticed that there might be issues in one of the five EBs in the SB Sgr_A_st_ao_03_7M. I wonder if it is possible to make adjustments to the data in the archive and re-ingest the products to the science archive, so that other users can assess the (hopefully) correct data.

The problem can be illustrated in the attached plot. The calibrated flux in spectral windows 20 and 22 of the phase calibrator J1744 in the EB uid://A002/Xf1ecde/X738b has anomalies: the flux drops to about half of the catalog value after the third scan. This has caused low scores for Tasks 16 and 21 in the weblog. We have attempted to investigate the root of this anomaly (e.g., switching the reference antenna) but got little clue so far. Meanwhile we tried to flag these scans in this particular EB, and found the result to be promising. The images from the pipeline after flagging the bad scans have acceptable RMS, and the scores for Tasks 16 and 21 in the weblog become 1.

The fix we did is simply add a flagging command in the flagtemplate file in the 'calibration' directory in the delivered package. In our case it is uid___A002_Xf1ecde_X738b.flagtemplate.txt, and we added one line in it:

mode='manual' spw='20,22' scan='8~19' reason='QA3:timegaincal_amplitude_time'

and then packed it into the tarball member.uid___A001_X15a0_X192.hifa_calimage_renorm.auxproducts.tgz.

Please let me know if what we did looks ok to you. If this is indeed a viable fix, could you replace the data in the archive with this updated flagtemplate and with the bad scans flagged?

xinglunju commented 2 years ago

More updates on the re-calibration

Flagging bad scans and rerunning calibration

Results after flagging

Overall assessment

xinglunju commented 2 years ago

Update on the re-calibration

The ARC has accepted the QA3 request and will re-run the calibration and replace the data in the archive. The problem is actually with the antenna CM02: it is not necessary to flag everything between scan=8 to 19, just flagging CM02 between scan=8 to 19 will solve the problem. The imaging results do not change much, though.

xinglunju commented 2 years ago

@keflavich The QA3 package has been delivered on Feb 16, could you download it to hipergator (if it hasn't been done)?

keflavich commented 2 years ago

The products are downloaded and the pipeline is being re-run

keflavich commented 2 years ago

TODO: I need to put up the new version of the pipeline weblog post-QA3

xinglunju commented 2 years ago

@keflavich did you finish running the pipeline? The two weblogs you posted either stopped before the aggregate continuum imaging or stopped before cube imaging & only included two EBs.

keflavich commented 2 years ago

The pipeline is fully re-run, I think - all the MSes and splits are present. I see all the image cubes.

...but you think some EBs are missing?

I see: https://data.rc.ufl.edu/secure/adamginsburg/ACES/weblogs-reimaging/member.uid___A001_X15a0_X192/pipeline-20220223T160940/html/t1-1.html

and in the directory I see:

drwxr-sr-x 28 adamginsburg adamginsburg 4.0K Feb 23 08:38 uid___A002_Xf1ecde_X738b.ms
drwxr-sr-x 28 adamginsburg adamginsburg 4.0K Feb 23 08:41 uid___A002_Xf1ecde_X784b.ms
drwxr-sr-x 28 adamginsburg adamginsburg 4.0K Feb 23 08:44 uid___A002_Xf20692_Xd716.ms
drwxr-sr-x 28 adamginsburg adamginsburg 4.0K Feb 23 08:47 uid___A002_Xf20692_X110ee.ms

so I think the pipeline run is all good.

xinglunju commented 2 years ago

Yes, this one has all the four EBs, but in the 'By Task' tab of the weblog, it goes as far as '10. hif_makeimlist: Set-up parameters for target aggregate continuum imaging' and then stops.

keflavich commented 2 years ago

The lack of weblogs is because the cubes are produced by the second approach to reimaging described here: https://github.com/ACES-CMZ/reduction_ACES/issues/163#issue-1272295566

xinglunju commented 2 years ago

Thanks for looking into this. For such pipeline runs, we need to download the images from Globus and review them, right?

keflavich commented 2 years ago

Yes, that's right. I'll work on integrating quicklooks of these cubes to the github issues.

xinglunju commented 2 years ago

Overview of the QA3 data

Imaging looks good. Set to 'done'? The calibration part of the QA3 pipeline should be in the ALMA archive, which is not accessible here, although it should be good.

Spectral windows

Continuum baseline is fitted with 0th order. Results look good. See spw20 and 22 for examples (from pipeline-20220223T160940) image image

Continuum & spectral line imaging

Looks ok. There are a few issues that can be fixed later when we combine with 12m/TP.

xinglunju commented 1 year ago

I recleaned the SPW24 cube on a local machine with cyclefactor = 2.0. No divergence can be seen. @pyhsiehATalma please use the updated cube for image combination.

I am uploading the images to Globus at: /upload/Sgr_A_st_ao_03_7M_reclean/

I have submitted a pull request to update the json file: #357

keflavich commented 1 year ago

Updated files have been moved to /orange/adamginsburg/ACES/data/2021.1.00172.L/science_goal.uid___A001_X1590_X30a8/group.uid___A001_X1590_X30a9/member.uid___A001_X15a0_X192/calibrated/working/. Old files are in /orange/adamginsburg/ACES/data/2021.1.00172.L/science_goal.uid___A001_X1590_X30a8/group.uid___A001_X1590_X30a9/member.uid___A001_X15a0_X192/calibrated/working/oldspw24

ericliang45 commented 3 months ago

Hi there, I was looking at the images on Globus and found multiple versions of "ALMA pipeline stage". @d-l-walker suggested I report it here so that @keflavich could remove the duplicated file as necessary. Details below:

ps. I didn't check how wide the scope of this multiplication is, beyond the said filtering I used.

Hope it helps.