Advice for an astronomy PhD

I am a third-year astrophysics PhD student on the verge of candidacy, specializing in star formation and working on observations. To provide some context, during my undergraduate studies, I engaged in purely theoretical work on pulsating variable stars, which involved extensive coding—a task I enjoyed. When applying to graduate schools, my preference was to work with a theorist; I had no interest in observational astronomy.

At the institution where I am pursuing my PhD, I was unable to collaborate with a professor who focused on theoretical work due to funding limitations or a mismatch in research interests. Consequently, I joined forces with a newly hired assistant professor who specializes in observations within my desired subfield—anything related to the study of stars and planets. Despite this, my passion for observations has not developed: I am disinterested in using the campus observatory, engaging with advanced telescopes, or taking advanced observational astronomy courses. By this point, I have fulfilled my department’s coursework requirements. Nevertheless, I have continued to work with my advisor because the work is tolerable—I do not need to collect new observational data; instead, I analyze existing data using Python. Moreover, we have an excellent rapport. She offers positive reinforcement, which I value as someone who deals with anxiety and self-doubt. Her enthusiasm for her subfield is infectious, and I cannot envision working with another professor.

Reflecting on my PhD journey thus far, I have resolved to pursue a career in data science or computer software after graduation, for several professional and personal reasons:

* [The starting salary in the private sector is higher than that of a postdoc](, as indicated by the American Institute of Physics (AIP). Financial security is a significant aspiration for me.
* Data science and computer software roles account for a larger share of positions that astrophysics PhD graduates fill, according to the same AIP source.
* I do not relish academic writing, grant applications, or the competitive nature of academia. However, I thoroughly enjoy coding and data interpretation.
* I also desire a job that offers a better work-life balance than academia. I wish to enjoy weekends and vacations without guilt, something I find research impedes.

Given this context, I have several questions:

* After I pass my candidacy this month, what steps can I take from then until the end of my PhD to enhance my coding skills and prepare for a career in data science, computer software, or machine learning? Should I seek online resources, or should I enroll in a data science course at my university and persuade my advisor to support this decision?
* Do many astrophysics PhD graduates working in data science or computer software do so because they initially sought academic positions but transitioned after unsuccessful attempts, or do they choose this path early in their PhDs, knowing they did not wish to remain in academia?
* Considering my firm decision against pursuing a tenure-track professorship or continuing in research post-PhD, would it be more advantageous to remain in the program and concurrently develop data science skills, or should I consider leaving the program? I am apprehensive about exiting the program as I have formed significant connections during my graduate studies, and I fear that leaving might lead to difficulty in finding employment and potentially having to live with my parents, as is the case with my sibling.