TIPSY: Trajectory of Infalling Particles in Streamers around Young stars. Dynamical analysis of the streamers around S CrA and HL Tau

Context. Elongated trails of infalling gas, often referred to as"streamers,"have recently been observed around young stellar objects (YSOs) at different evolutionary stages. This asymmetric infall of material can significantly alter star and planet formation processes, especially in the more evolved YSOs. Aims. In order to ascertain the infalling nature of observed streamer-like structures and then systematically characterize their dynamics, we developed the code TIPSY (Trajectory of Infalling Particles in Streamers around Young stars). Methods. Using TIPSY, the streamer molecular line emission is first isolated from the disk emission. Then the streamer emission, which is effectively a point cloud in three-dimensional (3D) position-position-velocity space, is simplified to a curve-like representation. The observed streamer curve is then compared to the theoretical trajectories of infalling material. The best-fit trajectories are used to constrain streamer features, such as the specific energy, the specific angular momenta, the infall timescale, and the 3D morphology. Results. We used TIPSY to fit molecular-line ALMA observations of streamers around a Class II binary system, S CrA, and a Class I/II protostar, HL Tau. Our results indicate that both of the streamers are consistent with infalling motion. TIPSY results and mass estimates suggest that S CrA and HL Tau are accreting material at a rate of $\gtrsim27$ M$_{jupiter}$ Myr$^{-1}$ and $\gtrsim5$ M$_{jupiter}$ Myr$^{-1}$, respectively, which can significantly increase the mass budget available to form planets. Conclusions. TIPSY can be used to assess whether the morphology and kinematics of observed streamers are consistent with infalling motion and to characterize their dynamics, which is crucial for quantifying their impact on the protostellar systems.


Introduction
The traditional picture of low-mass star formation assumes that protostars, together with their circumstellar disks, form due to the axisymmetric collapse of dense protostellar cores (e.g., Shu 1977;Terebey et al. 1984).Then, as the surrounding gas envelope disperses, protostars evolve from the embedded Class 0 and I stage to the Class II stage.These Class II systems are then traditionally assumed to evolve in isolation to form planetary systems, such as our Solar System.
However, stars form in turbulent giant molecular clouds, where the initial conditions for star and disk formation cannot be represented as isolated non-turbulent spheres (e.g., Alves et al. 2020;Garufi et al. 2022;Huang et al. 2020Huang et al. , 2021Huang et al. , 2022Huang et al. , 2023;;Gupta et al. 2023).The infalling streamers observed around more evolved YSOs further challenge our assumption that these systems evolve in isolation to form planetary systems; in reality, they are still embedded in large-scale molecular clouds (≳1 pc) and may continue to accrete material from them.
The infall of material in evolved sources can greatly influence the physical and chemical properties of protoplanetary disks and, thus, of the planets they form.For example, the supply of fresh material can help solve the "mass-budget problem" of protoplanetary disks, in which observations suggest that they are typically not massive enough to form the observed planetary systems (e.g., Manara et al. 2018;Mulders et al. 2021).Moreover, observations (Ginski et al. 2021) and simulations (Thies et al. 2011;Dullemond et al. 2019;Kuffmeier et al. 2021) have shown that material falling at these late stages can be dynamically different from the original parental core and can induce misalignments in disks.This can further explain the misalignments observed in evolved planetary systems (e.g., Albrecht et al. 2022).Late infall can also bring chemically different material to the system, which can explain the observed chemical diversity among meteorites (Nanne et al. 2019).Simulations (Vorobyov & Basu 2005;Dunham & Vorobyov 2012;Padoan et al. 2014;Jensen & Haugbølle 2018) have shown that infall-induced accretion bursts can naturally resolve the accretion luminosity problem in protostars (see Kenyon et al. 1990).Kuffmeier et al. (2023) demonstrated that infall of material onto Class II systems can also make them seem less evolved, which may affect studies on populations of YSOs.Finally, this phenomenon may also produce some of the observed protoplanetary disk substructures, such as rings (Kuznetsova et al. 2022), spirals (Hennebelle et al. 2017;Kuffmeier et al. 2018), and vortices (Bae et al. 2015).
However, the dynamics of observed streamers need to be characterized to assess their impact on the star and planet formation processes.This has only been done for a few streamers, using methods such as analyzing velocity gradients along the streamers in position-velocity space (e.g., Yen et al. 2014Yen et al. , 2019;;Alves et al. 2020), qualitatively comparing infalling trajectories from Mendoza et al. (2009) to the streamer velocity gradients and morphologies (e.g., Pineda et al. 2020;Valdivia-Mena et al. 2022;Garufi et al. 2022), and fitting infalling trajectories determined using the Ulrich-Cassen-Moosman (UCM) model (e.g., Ulrich 1976;Cassen & Moosman 1981) to the streamer structures in position-position-velocity (PPV) space (Thieme et al. 2022).These studies suggest that infalling streamers can transfer significant mass to the protostellar systems.However, these parameters are usually estimated only for embedded sources, and the range of their possible values is generally not well constrained.For more evolved Class I/II and II sources, the infalling material can be dynamically unrelated to the protostellar system, and thus we need to explore a wider range of initial configurations to identify the infalling trajectories that best represent observed structures.
To address these issues, we have developed the code Trajectory of Infalling Particles in Streamers around Young Stars (TIPSY)1 , which was designed to fit theoretical trajectories of infalling gas to molecular-line observations of streamers, without assuming any initial configuration (relative position and velocity) for the gas.We further used this code to analyze streamers around two evolved sources: the Class II binary system S CrA, for which a ∼1000 au streamer-like structure was reported by Gupta et al. (2023), and the Class I/II system HL Tau, for which a kinematic analysis of a ∼500 au streamer (Yen et al. 2019) and   Fig. 1.Schematic diagram of coordinate axes used to compute the theoretical trajectories of infalling gas (green cloud) around a protostellar system (orange star), as discussed in Sect.2.1.− → r 0 and − → v 0 denote the initial position and velocity vector of infalling gas, respectively.− → r represents the position vector of gas at a future point in its trajectory (circumference of blue ellipse), with θ and ϕ denoting the polar and azimuthal angles, respectively.The dashed red arrows show the unit vectors x, ŷ, and ẑ, defined using the directions of − → r 0 and − → v 0 .Together they set the coordinate frame in which TIPSY solves the Mendoza et al. (2009) equations.The gray plane represents the POS, with the overlaid dark gray arrows denoting the coordinate frame of our observations.the corresponding shock observations (Garufi et al. 2022) suggest an infalling motion of gas.Evolved sources are also more suitable for this kind of analysis because the protostellar masses can be estimated independently of streamer modeling, as done by using spectroscopy for S CrA (Gahm et al. 2018) and via the modeling of a Keplerian disk for HL Tau (Yen et al. 2019).
The fitting methodology employed by TIPSY is detailed in Sect. 2. Subsequently, we demonstrate TIPSY by using it to analyze the streamers around S CrA (Sect.3.1) and HL Tau (Sect.3.2).The results are discussed in Sect.4, and we conclude in Sect. 5.

Fitting methodology
TIPSY fits theoretical trajectories expected for infalling gas, following the model given in Mendoza et al. (2009), to the molecular-line observations of streamers.The fitting is done in three-dimensional (3D) PPV space: right ascension (RA), declination (Dec), and line-of-sight (LOS) velocity or radial velocity (RV); in other words, the morphology and velocity gradient of streamers are fitted simultaneously.To define a general initial configuration of infalling gas, we needed to define the 3D position ( − → r 0 ) and velocity ( − → v 0 ) vectors relative to the protostar (see Fig. 1).Relative position in RA and Dec direction as well as the relative speed in the LOS direction can be inferred directly from the observations.The remaining three parameters, required to define an initial configuration, are the separation in the LOS direction and the relative speeds in the RA and Dec directions.For a range of possible initial configurations, we computed theoretical trajectories (see Sect. 2.1) and compared them to the observations (see Sect. 2.2 and Figs. 2 and 3).The distribution of free parameters with reasonable fits was used to estimate uncertainties (see Sect. 2.3 and Fig. 4).Some of the known caveats associated with this kind of analysis are mentioned in Sect.2.4.A133, page 2 of 14 Gupta, A., et al.: A&A, 683, A133 (2024) Intensity-weighted means   The idea of comparing streamer observations to the infalling trajectories in the PPV space is similar to the fitting of UCM trajectories to elongated structures around the Class 0 protostar Lupus 3-MMS by Thieme et al. (2022).However, the UCM model assumes the particle to be in a parabolic orbit with no initial RV (e.g., Ulrich 1976).Moreover, Thieme et al. (2022) had to make further assumptions about the configuration of infalling gas, for example an initial radius of 10 000 au and a final centrifugal radius of 105 au.Such assumptions are less likely to be valid for more evolved (Class I/II and II) sources because the infalling material can be dynamically unrelated to the original parental core of the protostellar system.
A133, page 4 of 14 Gupta, A., et al.: A&A, 683, A133 (2024) (a) (b) Fig. 4. Distribution of goodness-of-fit estimates as functions of free parameters: initial speed on the POS (x-axis) and initial spatial offset in the LOS direction, for TIPSY fitting for S CrA (top panels) and HL Tau (bottom panels).Here, initial direction of gas in the POS (third free parameter) is fixed to the value for the best fit.Left panels: distribution of fractions of coordinate values of points in the observed streamer curve (intensityweighted means and standard deviations), which is consistent with the theoretical trajectories.Right panels: distribution of log(log(χ 2 )) deviations between the observed streamer curve and theoretical trajectories.In all the plots, yellow regions represent good fits.Red squares represent the best fit, as discussed in Sect.2.2.The red lines passing through them represent errors, as discussed in Sect.2.3.

Physical model
One of the first models for gas infalling onto a protostellar system was given by Bondi (1952); however, it did not consider the rotation of the infalling gas.Later, the UCM model developed, which provides analytical solutions for the trajectory of a particle infalling around a protostar, assuming that the initial rotation of the particle is about the rotational-axis of the central protostellar system or the "z-axis" (Ulrich 1976;Cassen & Moosman 1981;Chevalier 1983;Terebey et al. 1984;Visser et al. 2009;Shariff et al. 2022).This model has been used to analyze infalling motion of material in streamers around young protostellar systems (e.g., Thieme et al. 2022).
The boundary conditions used in the UCM model also assume that the infalling gas starts with a zero RV and it is just bound to the protostar, that is to say, it is on a zero energy parabolic orbit.However, for any general initial configuration of infalling gas, especially in the context of late infall of material onto a Class II system, these assumptions may not hold true.Mendoza et al. (2009) extended the UCM model to account for possible nonzero initial RVs and energies.This model has also been used to study kinematics of material in streamers around protostars at different evolutionary stages (e.g., Pineda et al. 2020;Valdivia-Mena et al. 2022;Garufi et al. 2022).The equations derived by Mendoza et al. (2009) to compute positions and velocities of an infalling particle along its trajectory are listed in Appendix A However, the original Mendoza et al. (2009) model still assumes the initial rotation is only about the z-axis.This assumption can be mitigated by solving the equations in a rotated coordinate frame, where the z-axis is defined not as the rotational axis of central protostellar system but as a vector normal to the plane of the particle trajectory.This is defined as the plane containing the initial position ( − → r 0 ) and velocity vector ( − → v 0 ) of the particle with respect to the protostar, as illustrated in Fig. 1.We used this generalized implementation of the Mendoza et al. (2009) model to generate trajectories of infalling particles without making any assumptions about their initial position or velocity.The results obtained from our implementation of Mendoza et al. (2009) models were also validated through two-body simulations using the REBOUND framework (Rein & Liu 2012), as shown in Appendix B.

Fitting procedure
TIPSY is designed to analyze molecular-line observations of streamers with a large enough recoverable scale to capture the streamer morphology, a sufficient spectral resolution to resolve the velocity profile, and a significant detection (≳3σ) of streamer emission in each of the channels (see Sect. 4.1 for A133, page 5 of 14 Gupta, A., et al.: A&A, 683, A133 (2024)  a further discussion).The first step in characterizing streamer observations involves separating the streamer emission from other sources of emission, such as disks.Given the wide range of morphologies exhibited by disks and streamers in different sources, which depend on the observational parameters and molecular lines used, it is hard to automate this step.Therefore, we visually examine the emission maps and define a boundary for a sub-cube that encompasses the streamer emission using RA, Dec, and RV limits.Next, we eliminate pixels with flux values below a specified noise (σ) level.Table 1 lists the values used for selecting streamers around S CrA and HL Tau.As long as the selected boundaries fully capture the observed streamer emission, the final results are not very sensitive to the exact values of these limits.This is because we primarily rely on the central brighter emission throughout the structure for the fitting, as described in more detail later.
The resulting sub-cube, comprising mainly of streamer emission, may still contain some unrelated emission features from residual noise or other gas structures.To get a more cleanly isolated streamer emission, we use a clustering algorithm to identify and remove seemingly unrelated emission.By default, we use the sklearn (Pedregosa et al. 2011) implementation of the Ordering Points To Identify the Clustering Structure (OPTICS; Ankerst et al. 1999) clustering algorithm, which computes density-based reachability distances to reveal clusters within a dataset.The biggest coherent cluster of emission in the selected sub-cube is identified as the streamer and the smaller clusters generally correspond to noise peaks.This step is designed to allow users to set liberal boundaries and noise thresholds while selecting the streamer sub-cube, as noise peaks can then be removed without reducing streamer emission.
This isolated and cleaned streamer emission can be imagined as a point cloud in 3D PPV space, as shown in Figs. 2 and 3c.The theoretical trajectories of infalling material (as discussed in Sect.2.1) that we aim to fit to the data can be represented as curves in the same 3D space.In order to directly compare the observation to the theoretical curves, we define a curve that would be representative of the observed streamer structure in the PPV space.To do this, we first divide the streamer points into several bins, set to ten by default, based on a distance metric.Then within each of these bins, we compute intensity-weighted means and intensity-weighted standard deviations of the RA, Dec, and RV values of all the points (red squares and their error bars in panel c of Figs. 2 and 3).This gives us a string of a few points, ten by default, in the same 3D space, which can be directly compared to the theoretical curves (panels c and d in Figs. 2 and 3).This method also reduces the dependence of fitting results on the fainter parts of the streamers, selected streamer boundaries, and the spatial and spectral resolution of the data.As long as an adequate number of bins are used (i.e., enough to capture the overall streamer curvature), the final fitting results will not be sensitive to the number of bins.
The distance metric (d) we use to bin the data is defined as , where r and θ are the polar coordinates of a point on the plane of the sky (POS), with respect to the protostar and the orientation of the streamer very close to the protostar (see Appendix C for more details).The w represents a weighting factor to adjust the importance of rθ distance (azimuthal direction) relative to the r distance (radial direction) in the distance metric calculation and is by default equal to one.Overall, larger values of d should denote points in the streamers that are expected to be farther away from the protostar.Figure C.1 shows the computation of the distance metric values for all the points in the streamers around S CrA and HL Tau.In addition to the binning of the data, the distance metric is also used as an independent variable for comparing theoretical curves to the observations, as discussed later.
To compare theoretical trajectories with observed streamers, we need to establish a parameter space that covers all the possible initial conditions.For a particle falling onto a protostar, there are seven initial configuration parameters: three for the particle's initial relative position in 3D, three for its initial relative velocity in 3D, and the protostar's mass.To determine the relative position in the RA and Dec directions in physical units, we use the physical distance to the protostellar system and the projected separation of the farthest point of the streamer.The separation in the LOS direction is unknown and treated as a free parameter.For the relative velocity, we use the systemic velocity of the central protostar and the LOS velocity of the farthest point of the streamer to obtain the relative speed in the LOS direction.The relative speed in the RA (v RA ) and Dec (v Dec ) directions are free parameters.To reduce computations, instead of treating v RA and v Dec separately, we use the total speed on the POS ( v 2 RA + v 2 Dec ) and the initial direction of the particle on the POS (arctan(v Dec /v RA )).Here, the initial direction on the POS can be constrained more easily by the projected shape of the streamer.For evolved sources (Class I/II and II), the protostellar mass is typically assumed to be known from other measurements such as disk rotation (e.g., Yen et al. 2018) or protostellar luminosity (e.g., Manara et al. 2023, and references therein).We note that mass estimates using luminosity can be quite uncertain for young Class I/II sources (e.g., Baraffe et al. 2012).In conclusion, we have three free parameters: relative separation in the LOS direction, relative speed on the POS, and the direction of the relative velocity on the POS.TIPSY allows users to set a range of possible values for each of these parameters, which creates a 3D parameter space that is used for the fitting.
Using this parameter space and the Mendoza et al. ( 2009) model (Sect.2.1), we calculate infalling trajectories for every parameter combinations.These trajectories are compared to the observed streamer curve (intensity-weighted means and standard deviations) to find the best fit.We independently compare the representative RA, Dec, and RV values using the distance metric, defined earlier as d = r 2 + (wrθ) 2 , as the independent variable for fitting.We use the first-order spline interpolation, as implemented in scipy (Virtanen et al. 2020), to get the theoretical values at the same distance metric values as the points of the observed streamer curve (panel d in Figs. 2 and 3).Then, we A133, page 6 of 14 Gupta, A., et al.: A&A, 683, A133 (2024)  examine what fraction of the RA, Dec, and RV values of the observed streamer curve match within the error bars (standard deviations) to the theoretical values.This fraction is referred to as the "fitting fraction" in Fig. 4. We consider the best-fit trajectory as the one that can accommodate the highest fraction of mean values representing the observed streamer, within their error bars.In cases where multiple trajectories fit the same fraction of values, we choose the trajectory with the lowest chi-squared deviation as the best fit.

Error estimation
As discussed in Sect.2.2, we compute theoretical infalling trajectories for each of the parameter combinations and check the fraction of values (RA/Dec/RV) of observed streamer's curvelike representation (intensity-weighted means) that agree with the theoretical values within the error bars (intensity-weighted standard deviations).To estimate errors in the fitted free parameters (LOS distance, projected speed on the POS, direction on the POS), we select trajectories that can fit at least a certain fraction, 0.9 by default, of the values of observed streamer curve.For each of these trajectories, we store the parameter combinations used to produce them.Subsequently, the errors are estimated as the standard deviations of each parameter for these parameter combinations with sufficiently good fits (fitting fraction greater ≥0.9). Figure 4 displays these errors in LOS distances and speed on the POS for the best fits of S CrA and HL Tau.These error estimates are, by default, also compared to the spatial and velocity resolution of free parameters, used for generating the parameter space.If the error (standard deviation) computed for a parameter is less than the resolution used, the error estimate is increased to this parameter resolution.This generally suggests that the resolution used to create the initial parameter space was too coarse to capture the true fitting uncertainty.
For the parameters estimated directly from the observation (i.e., the offset in RA, Dec and RV), intensity-weighted standard deviations corresponding to the outermost point of the observed streamer curve is used.All these uncertainties are further propagated to the derived physical parameters, as listed in Table 2. TIPSY also provides a table of goodness-of-fit measurements (fitting fraction and chi-squared deviation) for all parameter combinations, enabling users to independently estimate errors using their preferred methodology.
We note that TIPSY does not currently propagate errors in the fixed parameters to the errors of fitted parameters.These fixed parameters include stellar parameters (stellar mass, systematic velocity, and distance) as well as the parameters corresponding to the observed initial offset of the streamer with respect to the protostar (offset in RA, Dec, and RV).

Caveats
An important assumption in the Mendoza et al. ( 2009) models (see Sect. 2.1) used to compute infalling trajectories is that we consider only one force acting on the infalling material: the gravitational force of a point mass (protostar).To begin with, this means that we neglect the contribution of gravitational and tidal effects of circumstellar material.This assumption is valid as long as most of the mass is concentrated within the central region, which is usually the case, especially in the evolved sources.More importantly, we also do not account for the tidal forces from a multiple system, as briefly discussed in Sect.3.1.We also neglect the effects of gas pressure gradients and shocks (e.g., Shariff et al. 2022), magnetic fields (e.g., Unno et al. 2022), and turbulence (e.g., Seifried et al. 2013).However, these assumptions are generally valid at the length scales of streamers, which are farther away from the protostar, and thus, protostellar systems can be approximated as a point source and the gas density is low.Moreover, the fitting methodology of TIPSY can also be adapted to fit more complicated models to the streamer emission.
While fitting the observed streamer structures, we also assume that the observed intensity of molecular-line emission represents the actual density distribution of gas.This assumption should mostly be valid for low-density streamers; for streamers with a higher density of gas, an appropriately less abundant molecular tracer should be used.
Finally, it is important to note that the current implementation of TIPSY does not necessarily rule out the other possible causes of large-scale elongated structures, such as stellar flybys (e.g., Dong et al. 2022;Cuello et al. 2023), the ejection of gas (e.g., Vorobyov et al. 2020), or gravitational instability in disks (e.g., Dong et al. 2015).However, a good fit of observed structures by TIPSY would mean that the observed structures can be explained as infalling streamers.Ideally, a comparative analysis with other competing models would be required to identify the most likely cause.The analytical model used to compute infalling trajectories, as described in Sect.2.1, also allows us to generate unbound hyperbolic trajectories, which may be useful in identifying ejections of unbound gas (e.g., Vorobyov et al. 2020).Complimentary observations, such as polarization in the nearinfrared (e.g., Ginski et al. 2021) and molecules tracing shocks (e.g., Garufi et al. 2022), can be used to further ascertain the dynamical nature of the streamers.

Applications
In order to test the TIPSY methodology, we used two protostellar systems with known streamers: the Class II binary source S CrA (Gupta et al. 2023) and the Class I/II source HL Tau (Yen et al. 2019;Garufi et al. 2022).As TIPSY requires a prior estimation of protostellar mass, it is better suited to analyzing streamers around more evolved Class I/II and II sources.For these sources, most of the streamers have been serendipitously observed in bright 12 CO emission and generally suffer from significant cloud absorption and contamination.This may result in an inaccurate judgement of the extent of the streamers and, thus, an unreliable modeling of them.We present the fitting results for 13 CO (2-1) data of S CrA and HCO + (3-2) data of HL Tau in Sects.3.1 and 3.2, respectively.
A133, page 7 of 14 Gupta, A., et al.: A&A, 683, A133 (2024) 3.1.S CrA S CrA is a binary system, comprising of two Class II sources with a separation of ∼200 au, in the Corona Australis star-forming region.Using spectral and photometric monitoring of both of the protostars, Gahm et al. (2018) found them to be very similar to each other, with stellar masses of 1 M ⊙ .These masses agree with the modeling of orbital motions by Zhang et al. (2023).Zhang et al. (2023) also reported disk-scale spirals and a ∼200 au streamer-like structure connected to the southern protostar, as observed in SPHERE (Spectro-Polarimetric Highcontrast Exoplanet REsearch) polarization observations.Furthermore, Gupta et al. (2023) found this system to be surrounded by 0.1 parsec-scale clouds, appearing as reflection nebulae, and ∼1000 au elongated structures revealed by 12 CO (2-1) Atacama Large Millimeter/submillimeter Array (ALMA) observations, suggesting infall of material onto the system.However, these 12 CO observations suffered from contamination from surrounding diffuse gas (see Fig. F.1 in Gupta et al. 2023) and also a prominent absorption feature close to systemic velocity of the source, where a lot of bound material is expected to be.
For our analysis we used the 13 CO (2-1) observations, taken as a part of the same ALMA project (Project Id.: 2019.1.01792.S), which show a much cleaner ∼1300 au streamer (Figs. 2 and E.1a).We used the standard pipeline calibrated data and the imaging was done using "Briggs" weighting with robust = 0.5, a cell size of 0.05 ′′ , and "auto-multithresh" masking with default parameters.We detected the streamer at ≳5σ level, in all the relevant channels.
TIPSY results suggest that the overall streamer is consistent with being a trail of infalling gas.For the best fits, infalling trajectories could fit all the ten points in the simplified streamer (intensity-weighted means, red squares in Fig. 2) within the error bars (intensity-weighted standard deviations).The bestfit parameters, as given in Table 2, suggest that the material is strongly bound to the protostars, with the specific (per unit mass) total energy (kinetic energy plus gravitational potential energy; see Sect.4.2) of −1.1 ± 0.1 km 2 s −2 .This suggests that the observed structure is not an ejection of unbound material, which should be on hyperbolic trajectories.The size of observed streamer, which is at least an order of magnitude larger than the protoplanetary disks, further indicate that this is not a spiral arm induced by gravitationally unstable disk.
Moreover, we also find that the velocity profile of observed streamer changes close to the protostars, that is to say, the LOS velocities stop decreasing and start increasing, which was not reproduced in our best-fit models (Fig. 2d).This suggests that the gas falling from behind the protostar (see Fig. B.1a) is being slowed.The change in gas dynamics closer to the protostars could be due to the tidal forces from the binary system that are expected to be dominate in inner regions (e.g., Zhang et al. 2023).To test this, a detailed modeling of infalling material interacting with binaries and circumbinary material is required, which is beyond the scope of this study.

HL Tau
HL Tau is a Class I/II source with a ∼2 M ⊙ mass protostar (Yen et al. 2019) surrounded by a protoplanetary disk with concentric rings and gaps (ALMA Partnership 2015).Yen et al. (2019) found the source to be associated with a few-hundred-au-long streamer using HCO + (3-2) ALMA observations.They analyzed the velocity gradient along the structure and found it to be dominated by the infalling motion in the outer region.HL Tau is also known to be surrounded by a gas envelope with ∼1000 au scale asymmetric structures (Yen et al. 2017), which may be feeding this streamer.Furthermore, Garufi et al. (2022) also reported emission from shock tracer (SO 2 and SO) at the expected interface of the streamer and the disk, suggesting that the infalling material is impacting the disk.
For our analysis, we used the same self-calibrated HCO + (3-2) ALMA observations (Project Id.: 2016.1.00366.S) of HL Tau as described in Yen et al. (2019).These observations show significant emission (≳4σ) from the streamer, along with a Keplerian disk, in all the relevant channels (see Figs. 3 and E.1b).
TIPSY results, as shown in Fig. 3, demonstrate that all the points of the simplified streamer curve (intensity-weighted means) can be fit within the error bars (intensity-weighted standard deviations) by an infalling trajectory.The fitting results are listed in Table 2.For HL Tau, the specific kinetic energy is consistent with the specific gravitational potential energy within the error bars, suggesting that the gas is roughly in a zero-energy parabolic orbit.However, TIPSY could not constrain the trajectory of infalling particles for HL Tau well (see bottom panels, Fig. 4), as further discussed in Sect.4.1.

Data requirements
Comparing TIPSY fitting results for S CrA (Sect.3.1) and HL Tau (Sect.3.2), we can see that the uncertainties are much higher for HL Tau (see Table 2).Moreover, Fig. 4b shows that the distribution of best-fit parameters (higher fitting fractions, lower χ 2 deviations) are not well represented by simple symmetrical errors for HL Tau.This is likely because the HL Tau observations, limited by the largest recoverable scale, reveal only a ∼300 au part of streamer, much shorter than the ∼1300 au streamer around S CrA.This section of streamer is not long enough to capture any curvature in streamer morphology, which helps in constraining the speed of infalling particle on the POS.This is useful in breaking the degeneracy between the initial POS speed and the LOS separation and, thus, placing a stringent constraint on the streamer trajectories.This suggests that observations with higher recoverable scales (≳1000 au) are better for constraining streamer dynamics.
The channel width (velocity resolution) for both the S CrA and HL Tau observations is ∼0.1 km s −1 , which allows TIPSY to resolve the velocity profile (for further discussion, see Appendix D of Gupta et al. 2023).Besides this, TIPSY requires a significant streamer (>3σ) emission to be observed in all the relevant channels -as is the case in the analyzed observationsin order to distinguish the streamer from the surrounding diffuse gas and the background noise.

Physical parameters
As discussed in Sect.2.2, TIPSY fitting results provide estimates for the initial LOS distance (d LOS ), the initial projected speed on the POS, and the initial direction on the POS for the infalling gas.The initial speed and direction on the POS can be converted to the initial speed in the RA (v RA ) and Dec (v Dec ) directions using simple trigonometric relations.These parameters, combined with the initial LOS velocity offset (v LOS ) and the spatial offset in the RA (d RA ) and Dec (d Dec ) directions, inferred directly from observations, can provide complete information about the initial configuration of infalling gas relative to the protostar.
A133, page 8 of 14 These parameters can be used to derive other physically relevant quantities.For example, specific (per unit mass) kinetic energy can be estimated as 0.5 × (v 2 RA + v 2 Dec + v 2 LOS ).Similarly, assuming that the local gravitational potential is dominated by the mass of protostellar system, specific gravitational potential energy can be estimated as −G × M * / d 2 RA + d 2 Dec + d 2 LOS , where G and M * represent universal gravitational constant and mass of protostellar system, respectively.We can sum them to get the specific total energy (T.E.), which can tell us if the gas is in a bound elliptical orbit (T.E.< 0, similar to the streamer around S CrA), a bound parabolic orbit (T.E.≈ 0, similar to the streamer around HL Tau), or an unbound hyperbolic orbit (T.E.> 0).
Using the initial position ( − → r 0 ) and velocity ( − → v 0 ) vector of infalling gas, we can also estimate the specific angular momentum as − → r 0 × − → v 0 .This can be compared to the angular momentum of the disks to quantify the role of infalling material in misaligning the protoplanetary disks, as has been suggested by some hydrodynamic simulations (e.g., Thies et al. 2011;Kuffmeier et al. 2021).For the S CrA and HL Tau streamers, we find the specific angular momentum magnitudes to be 791 ± 218 AU km s −1 and 606 ± 1803 AU km s −1 , respectively.For reference, the specific angular momentum (l) in the outer part of a 100 au Keplerian disk around a 2 M ⊙ star protostar, similar to HL Tau, should be ∼421 AU km s −1 (l = √ GM * R d , where G, M * , and R d are the gravitational constant, the protostellar mass, and the disk radii, respectively).
As TIPSY provides the complete trajectory of the infalling gas, until the motion is dominated by the gravitational force, we can also infer the 3D (RA, Dec, and LOS distance) morphology of the infalling streamer, as shown in Fig. B.1.These morphologies can further be validated using near-infrared polarization observations, as the degree of polarization in such observations can be correlated to the 3D orientation of dust structures (e.g., Ginski et al. 2021).A better understanding of the 3D morphology of the streamer can be useful in constraining the location and velocity of impact for material falling onto the disk, which allows us to understand the role of infalling material in creating shocks (e.g., Garufi et al. 2022) and disk substructures (e.g., Bae et al. 2015;Kuznetsova et al. 2022).
TIPSY also provides an estimate of the infall timescale for the material, defined as the time taken for the best-fit solutions to reach the point closest to the protostars, starting from the farthest point in the observed streamer.We found infall timescales of 8301 ± 1358 yr and 2724 ± 1237 yr for the S CrA and the HL Tau streamer, respectively.This implies that these structures are either short-lived (≲10 000 yr, <1% of typical disk lifetime) or continuously replenished by larger-scale gas reservoirs.Both S CrA (Gupta et al. 2023) and HL Tau (Welch et al. 2000) are surrounded by large-scale clouds, which can be feeding these streamers.Serendipitously detecting short-lived structures should also be less likely, which could further suggest that these structures survive for longer by accumulating material from surrounding clouds.Large-scale clouds have been observed around other serendipitously detected streamers (e.g., Gupta et al. 2023).We also note that the derived infalling timescales are comparable to the lifetimes of tidal arms induced by stellar flybys (e.g., Cuello et al. 2023).
Moreover, the infall timescale can be combined with the mass of the streamer to estimate the mass infall rate.A rough lower limit of mass of molecular gas can be estimated from integrated flux (F streamer ), assuming optically thin emission, as where m H is the mass of a hydrogen atom, D is the distance to the source, A trans. is the Einstein A coefficient of observed line transition, ν is the line frequency, x mol. is the abundance of the molecule relative to H 2 , and f u is the fraction of molecules in the upper energy state of the transition (e.g., Bergin et al. 2013).
Here, f u can be further computed as f u = 3e E u /T /Q mol.(T ), where E u is the upper state energy for the transition, T is the gas temperature, and Q mol.(T ) is the partition function for the molecule.We took A trans. and E u values for 13 CO (2-1) (S CrA) to be 6.038×10 −7 s −1 and 15.87 K, and HCO + (3-2) (HL Tau) to be 1.453×10 −3 s −1 and 25.68 K, respectively, from the Leiden Atomic and Molecular Database (Schöier et al. 2005).The x mol.values were taken to be 1.45 × 10 −6 for 13 CO (e.g., Huang et al. 2020) and 10 −9 for HCO + (e.g., Jørgensen et al. 2004).For both sources, we assumed a representative temperature of 25 K, which is typical for gas at these ∼100-1000 au scales (e.g., Jørgensen et al. 2005).At this temperature, Q mol.(T = 25 K) values, interpolated from values provided in Cologne Database for Molecular Spectroscopy (Endres et al. 2016), were 19.6 and 12.0 for 13 CO and HCO + , respectively.We computed F streamer to be 1.3 × 10 −20 W m −2 for S CrA and 4.2 × 10 −21 W m −2 for HL Tau by integrating the flux of the isolated streamer emission (panel c in Figs. 2 and 3) over both the position and the velocity.Using these values, we estimated the streamer masses to be ≳2.1 × 10 −4 M ⊙ and ≳1.2 × 10 −5 M ⊙ for S CrA and HL Tau, respectively.Although these estimates do not include parts of the streamers beyond the primary beams of the interferometric observations, they can still be used to estimate mass infall rates as Ṁinf = M streamer /T inf , where T inf refers to the infall time for the observed streamer.Mass infall rates are found to be ≳2.5 × 10 −8 M ⊙ yr −1 (or ≳27 M jupiter Myr −1 ) for S CrA and ≳4.5 × 10 −9 M ⊙ yr −1 (or ≳4.7 M jupiter Myr −1 ) for HL Tau.Interestingly, these values are comparable to mass accretion rates of pre-main-sequence objects (e.g., Manara et al. 2023), which have been proposed to be influenced by late-accretion of material from large-scale clouds (Padoan et al. 2005).We note that typical mass accretion rates are generally an order of magnitude higher for Class I sources (e.g., Enoch et al. 2009), which may be a better comparison for HL Tau.Moreover, over typical disk lifetimes of a few megayears, these mass infall rates can increase mass available for forming planets by an order of magnitude, which can resolve the apparent mass-budget problem in Class II disks (Manara et al. 2018;Mulders et al. 2021).The estimated mass flow rates, along with the chemical characterization of streamers, can also be used to understand their impact in shaping disk chemistry (e.g., Pineda et al. 2020).We note that these values should be treated as an order of magnitude estimates.A reliable mass estimation will require modeling multiple molecular-line tracers, which is beyond the scope of this paper.

Conclusions
We have developed a code, TIPSY, to study the gas dynamics in infalling elongated structures, often referred to as streamers.TIPSY is designed to simultaneously fit the morphology and velocity profile of the molecular-line observations of streamers with the expected trajectories of infalling gas.
To begin with, TIPSY results can be used to judge whether the observations of streamer-like structures are consistent with infalling motion, depending on how well the infalling trajectories fit the streamers.The dynamical nature of the TIPSY solutions and complementary observations (e.g., Ginski et al. 2021;Garufi et al. 2022) can be used to rule out other potential causes, such as A133, page 9 of 14 stellar flybys (e.g., Cuello et al. 2023), the ejection of gas (e.g., Vorobyov et al. 2020), or gravitational instability in disks (e.g., Dong et al. 2015).Then, using the best-fit trajectories, TIPSY provides information about the 3D morphology and kinematics of the infalling gas.This can in turn allow us to estimate parameters such as the infall timescale, the specific angular momentum, the specific total energy, and potentially the expected impact zone of the streamer on the protoplanetary disk.These quantities, combined with a better understanding of overall gas reservoirs, can allow us to study the role of infalling material in replenishing disk masses, impacting disk chemistry, tilting disks, and creating disk substructures.
We tested TIPSY on two objects: a ∼1300 au 13 CO streamer around S CrA (a Class II binary system) and a ∼300 au HCO + streamer around HL Tau (a Class I/II protostar).For S CrA, we could characterize the dynamics of the streamer well, which seems to be consistent with infalling motion.The negative total energy estimated for the observed streamer, along with the large size compared to the protoplanetary disks, suggests that the observed structure does not represent an ejection of unbound gas or spiral arms induced in the disks.
The streamer around HL Tau is also consistent with infalling motion, which is in agreement with the kinematical analysis by Yen et al. (2019) and the shocks observed by Garufi et al. (2022).However, the uncertainties estimated on the best-fit parameters are relatively large, indicating that the observations likely cover a too small spatial scale to provide stringent constraints on the overall trajectory.This result is very informative on the type of observations that are needed to study and characterize infalling streamers.
Moreover, S CrA and HL Tau appear to be accreting mass at a rate of ≳27 M jupiter Myr −1 and ≳5 M jupiter Myr −1 , respectively.If sustained for long enough (≳ 0.1 Myr), such mass infall rates can significantly increase the mass budget available to form planets in evolved sources.

Fig. 2 .
Fig. 2. Flow of S CrA 13 CO (2-1) data in the TIPSY pipeline.Panel a: intensity-weighted velocity (moment 1) map in colors, overlaid with contours representing the integrated intensity (moment 0; see Fig. E.1).The red segments in the bottom-left corners depict a length scale of 1000 au.The pink ellipses in the bottom-right corners depicts the beam size of the data.Panel b: isometric projection of the 3D PPV diagram of pixels with intensity >5σ in the whole field of view.Panel c: isometric projection of the PPV diagram of an isolated and cleaned streamer.The red square and its error bars represent intensity-weighted means and standard deviations, respectively.Panel d: same as panel c, but with the best-fit trajectory, as represented by the black line.Black circles denote the interpolated values of the theoretical trajectory, which are directly compared to the intensityweighted means.Panel e: same as panel b, but with the best-fit trajectory, as represented by the black line.3D interactive versions of panels d and e are available online.

Fig. 3 .
Fig. 3. Same procedure as described in Fig. 2, but for HL Tau instead of S CrA.3D interactive versions of panels d and e are available online.

Table 1 .
Parameters used to isolate and fit the HL Tau and S CrA streamers.Notes.See Appendix D for more details on the stellar parameters used.

Table 2 .
Fitting results for S CrA and HL Tau.