Commit d7fb9166 authored by Andrea Giannetti's avatar Andrea Giannetti
Browse files

Updated scripts and guesses

parent 5dca05ed
Loading
Loading
Loading
Loading
+102 −0
Changes for etl/assets/ashes_cores.py: 102 added lines, 0 removed lines.
Original line number Diff line number Diff line
import csv

# Define the raw data as a multiline string
raw_data = """
G14             ALMA1  18 17 22.56 -16 25  0.7  9.97 32.27 0.91 3 0 
G14             ALMA2  18 17 21.46 -16 25  2.8  8.98 16.25 0.63 3 0 
G14             ALMA3  18 17 22.13 -16 25  5.8  6.35 14.86 0.85 3 0 
G14             ALMA4  18 17 22.86 -16 24 55.1  5.40  8.48 0.55 3 0 
G14             ALMA5  18 17 21.53 -16 24 58.7  4.82  5.48 0.46 2 0 
G14             ALMA6  18 17 21.65 -16 25  3.8  4.00  3.23 0.34 2 0 
G14             ALMA7  18 17 21.33 -16 24 56.6  3.56  9.34 0.68 2 0 
G14             ALMA8  18 17 22.51 -16 24 58.2  3.44  3.85 0.41 2 0 
G14             ALMA9  18 17 21.45 -16 24 54.5  3.40  3.38 0.42 0 0 
G14             ALMA10 18 17 21.38 -16 24 59.4  3.32  6.98 0.61 2 0 
G14             ALMA11 18 17 22.37 -16 24 56.6  3.07  6.32 0.58 2 0 
G14             ALMA12 18 17 22.28 -16 25  0.6  2.60  2.63 0.41 2 0 
G14             ALMA13 18 17 22.72 -16 24 55.9  2.58  1.75 0.32 2 0 
G14             ALMA14 18 17 22.24 -16 24 54.7  2.57  1.51 0.29 2 0 
G14             ALMA15 18 17 22.28 -16 24 58.4  2.46  1.28 0.27 2 0 
G14             ALMA16 18 17 22.03 -16 24 50.4  2.30  9.18 0.85 0 0 
G14             ALMA17 18 17 22.32 -16 24 51.0  2.09  4.77 0.60 2 0 
G14             ALMA18 18 17 21.89 -16 25  6.0  1.96  8.10 0.82 3 0 
G14             ALMA19 18 17 23.34 -16 25  2.2  1.84  9.97 1.13 2 0 
G14             ALMA20 18 17 22.21 -16 25  8.3  1.81  1.59 0.38 2 0 
G14             ALMA21 18 17 20.94 -16 24 51.1  1.44  5.05 0.88 0 0 
G14             ALMA22 18 17 21.96 -16 24 58.1  1.43  1.00 0.31 0 0 
G14             ALMA23 18 17 22.82 -16 25  4.1  1.38  3.40 0.66 2 0 
G14             ALMA24 18 17 22.81 -16 24 59.5  1.33  1.19 0.36 2 0 
G14             ALMA25 18 17 21.24 -16 24 51.2  1.30  3.36 0.68 1 0 
G14             ALMA26 18 17 23.20 -16 24 59.4  1.26  2.75 0.62 2 0 
G14             ALMA27 18 17 21.87 -16 24 57.1  1.26  2.10 0.53 0 0 
G14             ALMA28 18 17 23.67 -16 25  8.8  1.19  1.96 0.65 0 0 
G14             ALMA29 18 17 21.65 -16 24 53.1  1.17  1.47 0.47 1 0 
G14             ALMA30 18 17 23.78 -16 25  5.2  1.16  1.33 0.43 0 0 
G14             ALMA31 18 17 22.40 -16 25 12.0  1.16  6.15 1.03 2 0 
G14             ALMA32 18 17 21.16 -16 24 47.8  1.16  0.97 0.36 0 0 
G14             ALMA33 18 17 23.42 -16 25  5.8  1.12  2.25 0.67 2 0 
G14             ALMA34 18 17 21.31 -16 24 47.4  0.97  1.85 0.60 0 0 
G14             ALMA35 18 17 21.78 -16 24 42.9  0.94  1.79 0.61 0 0 
G14             ALMA36 18 17 21.71 -16 24 48.0  0.86  1.00 0.44 0 0 
G14             ALMA37 18 17 22.55 -16 25  7.4  0.75  1.25 0.63 0 0 
G14             Edge1  18 17 22.31 -16 25 31.0  3.00 20.03 1.36 1 1 
G28             ALMA1  18 43 32.34  -4 13 33.8  2.74  5.38 0.90 1 0 
G28             ALMA2  18 43 31.12  -4 13 19.5  1.79  8.97 1.21 0 0 
G28             ALMA3  18 43 30.79  -4 13 20.7  1.73  8.97 1.24 0 0 
G28             ALMA4  18 43 31.29  -4 13 15.6  1.62  1.55 0.46 0 0 
G28             ALMA5  18 43 31.46  -4 13 20.1  1.32  7.35 1.24 0 0 
G28             ALMA6  18 43 30.57  -4 13 33.3  1.18  4.03 0.95 3 0 
G28             ALMA7  18 43 30.45  -4 12 55.5  1.10  1.20 0.51 0 0 
G28             ALMA8  18 43 31.69  -4 13 20.5  1.03  3.75 1.12 0 0 
G28             ALMA9  18 43 30.19  -4 12 56.6  1.01  1.99 0.75 0 0 
G28             ALMA10 18 43 31.00  -4 13 35.8  0.97  1.87 0.73 0 0 
G28             ALMA11 18 43 30.66  -4 12 59.5  0.76  2.29 0.98 0 0 
G28             ALMA12 18 43 30.66  -4 13  3.9  0.74  4.00 1.27 0 0 
G28             ALMA13 18 43 30.79  -4 13 11.1  0.63  1.50 0.88 0 0
G332.96         ALMA1  16 18 34.46 -50 24 56.0  1.65  5.00 1.05 3 0 
G332.96         ALMA2  16 18 30.46 -50 25 23.1  0.94  0.78 0.49 0 0 
G332.96         ALMA3  16 18 30.83 -50 25 20.5  0.91  3.02 1.08 0 0 
G332.96         ALMA4  16 18 32.10 -50 24 50.1  0.84  1.38 0.60 0 0 
G332.96         ALMA5  16 18 30.85 -50 25 14.7  0.74  1.79 0.84 0 0 
G332.96         ALMA6  16 18 31.06 -50 25  9.6  0.67  1.64 0.86 2 0 
G332.96         ALMA7  16 18 32.23 -50 24 48.4  0.62  0.54 0.42 0 0 
G332.96         ALMA8  16 18 31.88 -50 24 50.3  0.58  0.58 0.50 0 0 
G332.96         ALMA9  16 18 34.34 -50 24 59.0  0.53  0.97 0.72 0 0 
G332.96         ALMA10 16 18 31.53 -50 25  4.2  0.52  0.34 0.37 0 0 
G332.96         ALMA11 16 18 31.64 -50 25  7.5  0.51  0.77 0.68 0 0 
G332.96         ALMA12 16 18 32.26 -50 25  2.5  0.51  0.57 0.52 0 0 
G332.96         ALMA13 16 18 30.15 -50 25 16.3  0.49  0.48 0.47 0 0 
G332.96         ALMA14 16 18 31.46 -50 25  9.0  0.47  0.32 0.40 0 0 
G332.96         ALMA15 16 18 30.13 -50 25 14.0  0.46  0.45 0.50 0 0 
G332.96         ALMA16 16 18 31.85 -50 24 54.6  0.45  0.45 0.50 0 0 
G332.96         ALMA17 16 18 30.74 -50 25  3.1  0.44  0.41 0.50 0 0 
G332.96         ALMA18 16 18 31.81 -50 25  3.8  0.43  0.47 0.55 0 0 
G332.96         ALMA19 16 18 30.57 -50 25 11.3  0.42  0.41 0.49 0 0 
G332.96         ALMA20 16 18 30.73 -50 25  6.1  0.37  0.66 0.70 0 0"""  # Truncated for this step; will load all data in next step if works

# Split the lines
lines = raw_data.strip().split('\n')

# Prepare CSV rows
csv_rows = [["Clump", "Core", "RA", "DEC", "F_p", "F_{int}", "R_{eff}", "Class", "Edge"]]
for line in lines:
    parts = line.split()
    clump = parts[0]
    core = parts[1]
    ra = f"{parts[2]}h{parts[3]}m{parts[4]}s"
    dec = f"{parts[5]}d{parts[6]}m{parts[7]}s"
    F_p = parts[8]
    F = parts[9]
    R = parts[10]
    C = parts[11]
    E = parts[12]
    csv_rows.append([clump, core, ra, dec, F_p, F, R, C, E])

# Write to a CSV file
csv_path = "./data/ashes_cores.csv"
with open(csv_path, "w", newline="") as csvfile:
    writer = csv.writer(csvfile)
    writer.writerows(csv_rows)

csv_path
+3 −0
Changes for etl/assets/commons/__init__.py: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -151,6 +151,9 @@ def get_cube(filename, datadir, frequency_limits=None, smooth_data=False):
        cube.cube = smoothed_data
    if frequency_limits is not None:
        cube = cube.slice(frequency_limits[0], frequency_limits[1], unit=u.GHz)
        if cube.header['CRPIX3'] == 1:
            fn = np.max if cube.header['CDELT3'] < 0 else np.min
            cube.header['CRVAL3'] = fn(cube.xarr).value
    return cube


+6 −6
Changes for etl/config/ch3oh_regions.yml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ G28: {
  'envelope_05': [317, 259, 25, 1],
  'envelope_06': [200, 194, 25, 1],
  'envelope_07': [167, 336, 25, 3],
  'core_envelope_01': [150, 200, 10, 1],
  'core_ch3oh_01': [150, 200, 10, 1],
}
G14: {
    'core_cont_01': [220, 260, 8, 1],
@@ -25,12 +25,12 @@ G14: {
    'core_cont_06': [284, 245, 8, 2],
    'core_cont_07': [305, 268, 8, 2],
    'envelope_01': [251, 292, 25, 2],
    'envelope_02': [181, 249, 25, 1],
    'envelope_03': [288, 338, 25, 1],
    'envelope_04': [328, 318, 20, 1],
    'envelope_05': [185, 197, 25, 1],
    'envelope_02': [288, 338, 25, 1],
    'envelope_03': [328, 318, 20, 1],
    'envelope_04': [185, 197, 25, 1],
    'core_ch3oh_01': [251, 208, 20, 2],
    'core_ch3oh_02': [301, 224, 8, 1],
    'core_ch3oh_03': [186, 252, 10, 3],
}
G332.96: {
    'core_cont_01': [137, 272, 15, 1],
@@ -40,5 +40,5 @@ G332.96: {
    'envelope_02': [328, 242, 25, 3],
    'envelope_03': [334, 157, 30, 1],
    'envelope_04': [210, 204, 30, 1],
    'envelope_05_global': [285, 215, 55, 3],
#    'envelope_05_global': [285, 215, 55, 3],
}
 No newline at end of file
+10 −10
Changes for etl/config/guesses.yml: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -35,9 +35,9 @@ G28: {
    [ 2.0e+5, 2.0e+5 ]
  ],
  core_cont_08: [
    [ [ 0.015, 0.02, 0.005, 0.001 ], [ 0.02, 0.03, 0.01, 0.003 ], [ 0.012, 0.013, 0.002, 0.001 ], [ 0.001, 0.012, 0.001, 0.0005 ] ],
    [ [ 0.01, 0.024, 0.005, 0.001 ], [ 0.02, 0.023, 0.006, 0.001 ], [ 0.012, 0.013, 0.003, 0.001 ], [ 0.001, 0.02, 0.001, 0.0005 ] ],
    [ -4.0e+5, 0.0e+5, 9.5e+5, 35.0e+5 ],
    [ 1.9e+5, 1.9e+5, 1.8e+5, 3.0e+5 ]
    [ 1.9e+5, 1.9e+5, 2.5e+5, 3.0e+5 ]
  ],
  envelope_01: [
    [ [ 0.02, 0.03, 0.003, 0.001 ], ],
@@ -74,7 +74,7 @@ G28: {
    [ 6.0e+5, -6.0e+5, -2.0e+5 ],
    [ 2.0e+5, 2.0e+5, 2.0e+5 ]
  ],
  core_envelope_01: [
  core_ch3oh_01: [
    [ [ 0.025, 0.035, 0.003, 0.001 ], ],
    [ 0, ],
    [ 2.5e+5, ]
@@ -123,21 +123,16 @@ G14: {
    [ 2.5e+5, 10.0e+5 ]
  ],
  envelope_02: [
    [ [ 0.05, 0.07, 0.02, 0.003 ] ],
    [ 6.0e+5, ],
    [ 2.0e+5, ]
  ],
  envelope_03: [
    [ [ 0.025, 0.035, 0.003, 0.001 ], ],
    [ 0, ],
    [ 2.5e+5, ]
  ],
  envelope_04: [
  envelope_03: [
    [ [ 0.02, 0.03, 0.003, 0.001 ], ],
    [ 0, ],
    [ 2.5e+5, ]
  ],
  envelope_05: [
  envelope_04: [
    [ [ 0.02, 0.03, 0.003, 0.001 ], ],
    [ 6.0e+5, ],
    [ 2.5e+5, ]
@@ -152,6 +147,11 @@ G14: {
    [ 0, ],
    [ 2.5e+5, ]
  ],
  core_ch3oh_03: [
    [ [ 0.02, 0.1, 0.015, 0.002 ], [ 0.01, 0.04, 0.015, 0.002 ], [ 0.01, 0.04, 0.015, 0.002 ] ],
    [ 4.0e+5, 10.0e+5, 15.0e+5 ],
    [ 2.5e+5, 1.5e+5, 1.5e+5 ]
  ],
}
G332.96: {
  core_cont_01: [
+3 −3
Changes for etl/mdl/inferred_densities/clump_densities_G14.yml: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@ clump:
  fwhm:
  - 1.7556571361160092
  reliability_score:
  - 0.6609834504975898
  - 0.6603623014166846
  uncertainty:
  - - 4.903927027044328
    - 5.170300451599158
  - - 4.901537554413444
    - 5.167549678354421
  vlsr:
  - 39.62683657035755
Loading