Well I've posted elsewhere but I might as well try all my options, someone here was helpful last time when StackExchange was not.
I do not know Python well. I'm piecing together code based on examples I've seen elsewhere, and I've only trained in Python for making plots and things like this. So bear with me as much as possible.
I have data from the CANDELs surveys with some 180,000 galaxies in five different fields (UDS, GOODS-S, GOODS-N, COSMOS, etc.)
Unfortunately for me, the Hubble teams clearly compiled data separately because what they've sent me comes in the form of catalogues with differently named columns. I'm interested in making a master file for all five fields where I can get the median mass calculated by the Hodges-Lehmann estimator in the linear space considering only estimates with the same assumptions for IMF and stellar templates.
But in one catalogue (say UDS) this might be called M_med, while in another catalogue this might be called M_med_HL.
So I've written code that will make a combined csv if the columns are all named the same. But they're not: two of the fields have this one column named differently.
Additionally, two of the other fields don't have the values of this column on a logarithmic scale (I basically just need to log_10 the column).
So all in all, I need to change the column name of two of the source docs, and put the column in a logarithmic scale in two of the other source docs, then I will have everything in place to combine them into one master doc.
I've considered just copying the files and going in to the source file and fixing the column names, but they're "security catalogue" files and I have no idea how to open these except using Python.
This is what I'm going to combine things with:
[GALLERY=media, 9578]Pythmass by Meow Mix posted Aug 11, 2021 at 2:22 AM[/GALLERY]
I do not know Python well. I'm piecing together code based on examples I've seen elsewhere, and I've only trained in Python for making plots and things like this. So bear with me as much as possible.
I have data from the CANDELs surveys with some 180,000 galaxies in five different fields (UDS, GOODS-S, GOODS-N, COSMOS, etc.)
Unfortunately for me, the Hubble teams clearly compiled data separately because what they've sent me comes in the form of catalogues with differently named columns. I'm interested in making a master file for all five fields where I can get the median mass calculated by the Hodges-Lehmann estimator in the linear space considering only estimates with the same assumptions for IMF and stellar templates.
But in one catalogue (say UDS) this might be called M_med, while in another catalogue this might be called M_med_HL.
So I've written code that will make a combined csv if the columns are all named the same. But they're not: two of the fields have this one column named differently.
Additionally, two of the other fields don't have the values of this column on a logarithmic scale (I basically just need to log_10 the column).
So all in all, I need to change the column name of two of the source docs, and put the column in a logarithmic scale in two of the other source docs, then I will have everything in place to combine them into one master doc.
I've considered just copying the files and going in to the source file and fixing the column names, but they're "security catalogue" files and I have no idea how to open these except using Python.
This is what I'm going to combine things with:
[GALLERY=media, 9578]Pythmass by Meow Mix posted Aug 11, 2021 at 2:22 AM[/GALLERY]