Broyden-Fletcher-Goldfarb-Shanno Bfgs

Btc

Cdfs Chandra

CCD Charge-Coupled Device

Keywords: ACS Advanced Camera for Surveys, ANN artificial neural network, AOCS Attitude and Orbit Control System, BAO Baryon Acoustic Oscillations, BFD Bayesian Fourier Domain, BFE Brighter-Fatter effect Big Throughput Camera Imaging Survey, CMB Cosmic Microwave Background, COMBO Classifying Objects by Medium-Band Observations, COSMOS COSmic evOlution Survey, CSS-OS Chinese Space Station Optical Survey, CTI Charge Transfer Inefficiency

. . . There isn't. We're solving the same problem.

9 "Wh.. wh... wha... what thing?" "The thing, the THING! It... It's got like buttons on, lights on, it beeps." 10 The best thing I thing I ever came up with, and I will stand by that statement, even though we're not quite yet at page-1-out-of-over-200 of this here document.

x Some of the foundations on which le Club Social was built were laid out years before it was ever founded, When a few young humans converged upon a certain pr épa, where they thought they would unlock the secrets of maths and science. Did they? Eh.

What they did unlock, undoubtedly, was the key to each other's friendship. Wait, one does not unlock a key. What they did find was the key to each other's friendship.

Thanks to Gibergues, Davy, Coco. I10 was born then, isn't dead, and I hope never will. Wait, I guess we do not want to impose anything upon our (more-or-less, depending on which of us three you ask) hypothetical children, so maybe it should, someday. In the meantime, I'd like to thank Thomas for being a third of I10, for being my meme dealer when I needed it back then, for being the VP of my Club Fus ée, and most importantly, for being a true, everlasting, friend. All ô. Allez ? All ô, allez ? Allez, all ô, allez ? I'd like to thank Steven. Steven and I have been through this over-the-top thank you game before. I'm pretty happy with where we left it last time, so I won't try to outdo it this time. Thanks, Steph.

Also, thanks to Carbal. For the freshness you brought -and keep bringing -to us all. Carbalou, there's this time, when you were doing the thing with the models and the paint and all, and I wasn't there. I don't even remember, so I couldn't tell you why now, but I suppose it was something important. You never blamed me for that. This is supposed to be thanks, not apologies, but I've already done the thing where I hand out both at the same time, so Carballou -thanks for being amazing, and sorry for not being there that time.

It's been a few paragraphs since we had a healthy (hah!) Song of Ice and Fire reference, hasn't it? I'd like to thank Martina and Cash, the Ygritte and Ghost to my Jon Snow.

I started (and finished) my thesis in the very, very far suburbs of Paris (ask me about my commute 11 ), while living inside the walls of the City of Love. Before then, I came from a better place.

From there I keep some of my oldest and staunchest friends, that as I went through those 3 years of science, went alongside me through 3 years of life -such different lives all, yet we never lost one another.

My thanks to Ros é (of the Jeu de Jos éphine et Morgan fame), VITHOR (lead guitarist of the Filaments de Banane), Clothilde, Cl ément, Anouk, Manu and Nono.

I thank Q for all the ONE, TWO, WOOP-WOOPs and for being central in holding us all together through the years.

Especially though, I'd like to thank les Paris évriens 12 , for their frequent and crucial support these last few years.

Thanks to Lady Manue (and the Lord Cedex), and DC (another role model of mine). Thanks, Maxou -you've certainly been one of those I could have named most often, for you've been a part of so many different aspects of my life, as far back as our TSB days. Through each of those we shared amazing moments -thanks.

Speaking of TSB! I'd like to thank, of course, my bro Maury. Our story started long before this thesis -our story started long before almost anything that is still around in our lives today, really. Our story went through some really good phases and some just-decent phases. Through it all, we've remained TSBs, and we've remained brothers.

Jo (tout c ¸a parce que le chien est noir). We haven't met face-to-face in far too long. But still, I know you're there. Thanks for your random showing up to that one new year's eve, and for our very recent online conversation. TSB for life! I'd like to thank Lionel as well, and Virgile. And here's another great segue! Okay, maybe not great, but it's a segue! El éonore, I'd like to thank you, not because it is easy, but because it is hard 13 . This is three years of my life, 11 Don't ask me about my commute.

12 A name so brilliant that I wish I came up with it, though it was none of my doing. 13 Please read this with JFK's voice.

xi and you were a big part of some of them, and also, you never spilled the beans on what TSB means. Thanks! I'd like to thank Billy for being Billy. "Is this a Billy and Z thing?" Here's some neither Z, nor Billy people I'd like to thank for all the Billly-and-Z-things: Meg (Day 799. They still don't know I'm scrambled eggs.), Brian, SydSyd, Oddmund, Lady.

Most people end their acknowledgments with something along the lines of "of course, thanks to my family". I am not most people, though I'd definitely be nowhere without my family.

My beloved siblings. I know you'd make drama out of who came first, so you both get the same paragraph, okay? The Morgan that wrote this only came to being through kid Morgan, that you both had an incredible influence over. And you still do, of course. Thank you both, for everything. I love you, and I love all my wonderful nieces and nephews. Thanks for them all! And thanks to my amazing sister-and brother-in-law as well!

Thanks to Manou for being the best grandmother there ever was. Dad. Thanks for all our father-and-son times, and for all the rest! Alex. Thanks for all our Final Fantasy summers, and for all the crazy unexplainable stuff that happened to us back then. Let's do it again soon! Thanks to my kiwi family for their neverending oversea support.

And lastly, here come a few full specials. My two C0110C20UF 14 , mon Pellos et ma Comtesse. You two are amazing and I had some of the very best times of my life so far in our amazing house. So far in italics, because house or no, as long we have each other, I'm sure we'll have many more. Thank you so much.

Mon Nas, second oldest of all my friends, in this realm and a few others. Thanks for everything.

Valou, "mon ex-meilleur-ami," you know how much I admire you and how big an influence you have on me. Thanks for fighting the good fight(s)! Milady Hand, the Bittersteel to my Blackfyre, the Orys to my Aegon, "my shield, my stalwart, my strong right hand," my Best Friend. You make life great. Thank you.

And, last but not least, thanks to the best, most important

Ow-wee, what a ride. Many are the humans who made those last three years as enjoyable as they were. I am pretty sure I will forget several -so let me start with them. Thank you to all of you I have forgotten! I would like to give my heartfelt thanks to Nabila Aghanim, Jim Bartlett, Andr é Ferari, Catherine Heymans and Fred Courbin, and especially to my two referees, for their careful reading of this document. I am honored to have had you all on my jury.

Next, I would like to give my two advisors my thanks, and my apologies as well. There was so much more we could have done if only I could have worked faster. Working under Jean-Luc's guidance was more enriching than I could possibly express -and, knowing he is not a big fan of how excessively long and lyrical my writing sometimes gets, I won't even try. Let me simply express my gratitude to him then, for teaching me so much not just on the science side, but also on the human side.

I haven't had quite as much time as I would have liked to work with my co-advisor, Martin, but I will still leave with many fond memories of our work on CFIS and, especially, on our Table Ronde -may we have many more occasions to work together in the future! I would like to thank every single good teacher I had throughout the whole journey so far. With a special mention to Mr Beguier, my very first -and certainly very best -physics teacher, who once wondered if I would remember him "if I ever became a physicist". I do, sir, and hope this is close enough! I have learned so much during my time at the CosmoStat, not just from Martin and Jean-Luc, but from many of the other wonderful people there. To those who left before me -Ming, Arnau, R émy, Julien (though he kind of came back) -and those who will remain when I am gone -Vanshi, J ér ôme, Valeria, Sandrine, Florent, Sam, Isabella, Austin (though he will soon be leaving too), Kostas, Mel, Zacc, Hung, Jiaxin, Kamshat, Toby (good luck with all the PSFs) -thanks for all the good times! Now, if there are quite a few names missing in those two lists, it is not because they are all included in the very first of the thanks I handed out on this page (though what a great safety net I weaved for myself there). Starting with more alumni, I would like to give special thanks to Fred, who guided me through the first leg of my CosmoStat journey -and what a guide he was! A great many interns have come and bolstered the ranks of the CosmoStat during my stay. I give them all my thanks. Louis, Charles, and J ér ôme of course deserve a special and nominative thank you for clearly being among the very best, as illustrated, for instance, by their surviving my mentorship.

Rebeca did both of the above, and a lot more. I don't think anybody's counting, or that there even is a limit, so I'm not going to just hand her a thousand thanks, I'm going to go ahead and hand her an infinite amount. Not just ℵ 0 thanks either, here's ℵ 1 thanks to Beca -for her (ridiculously) hard work, the passion and enthusiasm she never ceased to show, her willingness to dive into scary code, the swiftness with which she grasped hard concepts and toyed with them as if they were the simplest arithmetical operations. . . For Operation Unicorn, for getting as excited as I did with our absurd idea of a non-symmetric, "gravity-well" ground metric in optimal transport, and for all the hilarious, genuine comments I keep stumbling upon in the countless parts of the λRCA code she contributed to.

Then come two former CosmoStat PhD students who have had a great deal of influence on me, whether knowingly or not. The Robbs to my Bran -Franc ¸ois and Linc. The former is also, in a way, the (early) Sansa to my Arya; the annoyingly perfect older sibling everyone dotes upon. Though in our case of starkness-with-a-c, instead of frustration, Franc ¸ois' blazing trail was a source of motivation and desire to better myself as a young scientist. And, yes, it perhaps contributed the slightest in the feeling that I could have done a lot more in 3 years -but that is probably not altogether unhealthy (or untrue). Though we only met a few times, each of those occasions was also a massive source of inspiration to me. The actual talks of his I attended once again painted a clear example of the scientist I hope to one day grow into, while our offline conversations often had a profound impact on me and how I approach our work. I am similarly eternally grateful to Linc, for his wise counsel in professional matters, and stalwart friendship in all others.

A lifetime ago, an almost-beardless young man arrived in an office he shared with two exceptional people.

I would like to give special thanks to Joana (d ésol é pour les bruits de chaise et tout le reste) and C écile (coin coin) for making me feel at home right from the beginning! I'd like to extend my thanks to Atoooooooooor, for being one of the most fun, funniest, most positive humans I ever crossed paths with. And a brilliant, brilliant mind besides. Thanks for the JC co-rule and all the rest! To my little academic sister Virgi (and Philipino) -thanks for the Meta Jean Louis, the top-level conversations, and generally for being beautiful human beings. Don't work too hard, and sorry I got you in trouble that one time.

While I'm on the PhD-tree-as-genealogy slippery slope of an analogy, here's to Cricri. The Jaime to my Lancel, I suppose, but not in a weird way, in a good way; the successful cousin (though I guess I'm technically more of his academic uncle) your immediate family always uses half-jokingly to push you forward. "So, your cousin Christophe submitted his thesis; how's the writing, by the way?" I will miss our conversations, and I truly fear for the imminent day I am expected to do science without being able to just cross the corridor to ask him about maths, or signal processing, or mostly anything.

Then there's my Pexito, First Knight of the Order of #teammorgan, and last man flying our banners. I will never forget that memorable train ride -for which I am grateful -nor some of his darkest jokes -for which... yeah, perhaps just a little less so? Thanks for your kindness, good humour, and loyalty.

Working on this thesis the last three years brought me a great many things. I suppose the most obvious are the fancy title, myriad skills and knowledge, and people I got to meet. But there is, of course, a lot more beyond all that. As I am writing these lines, I would be hard pressed to rank all those things in order of importance, or of how much of an impact I expect them to have on the rest of my life -as I suppose one always is, upon the end of any arbitrary period of one's own life. If you look back and consider, say, the twenty-second year of your life on this Earth, what would you say was the single most important thing there? And if you could go back and ask yourself, on the eve of your twenty-third birthday, what you then believed it would be, would you be anywhere close to the mark? Granted, the use of such an exercise is extremely doubtful. When Morgan from the year 2047 looks back, just how important the skills and knowledge we have obtained these last three years will have proven to be will be highly dependent on a great many factors. Did we stay in academia? In a closely related field? Does society look anything like what it does today? Does cosmology? I suppose what I am trying to get at is that, of all the events that occurred and the people I met over the last three years, if I had to place bets on which would have the longer lasting, most beneficial effects on my existence. . . Thanks to Imane. For her perpetual support, unrivalled understanding, for her help with all the emails, for the laughter and the joy but also the sad bits, for teaching me so much -lessons that just might end up impacting me more than the purely scientific ones. Thanks for always being here for me, for opening my eyes to so much, for being an amazing sister -and considering how high the bar was set by the one life and biology had seen fit to give me, it's not a title I hand out easily -my excessive appreciation for the academic-tree-as-genealogy parallels notwithstanding.

Beyond CosmoStat, there are a great many people in the DAp I'd like to extend my thanks to: Delphine, Lisa, Max, Mansour (DEUX SEVRES), Bruno (thanks for your sharpeye arrowshots to the many administrative nooses that could have otherwise abruptly ended my renegade academic life), Floriane, Rapha ël, Kyle, the other Kyle, Wenjie, Anna (I never got that contact for the Antarctic icebreaker, did I?), Henri, Koryo.

During a few weeks of my PhD, I had the chance to work on one specific aspect of Euclid that would later prove to be pretty important. This was some of the most enjoyable work I have carried out so far, in no small part because this is also when I got to work with Pierre-Antoine and (yet another) J ér ôme the closest. I would like to thank them both: PA, thank you for your kindness, diligence in every task you undertake, for our countless long and fruitful discussions about all things PSF. J ér ôme, thank you for never failing to take the time to help me out and answer all my questions when I know how precious a resource your time is these days. Thanks as well for being a true inspiration: I doubt there is a single other person that truly knows so much about our whole mission, from the hardware to the cosmology.

Thanks to Jean-Charles, for the beautiful, beautiful maps that the reader shall find further down these pages (and for the amazing course he gave at the Euclid Summer School)! Thanks to Bobby, Sr., for being an oasis of easy-goingness throughout those three years -which included a few times I needed it more than I think he'll ever know.

Thanks to Vianney and Matthias for being part of my "comit é de th èse," and to the latter for also being my thesis godfather (I could have translated that bit too and used quotation marks, but it's got more of a ring to it that way, doesn't it?). Thanks to Pascale for her infinite kindness while she was a part of DAp. Thanks to Philippe, though we only interacted a very few times, for -as much as I could judge from those few encounters -being well up to the job. In terms of mantles that are hard to pick up, I would be remiss if I did not thank Marie for being nothing short of an IT wizard. I'd like to extend my thanks to those who came after her, too. Thanks to (the other) Pascale and to Dominique for their efficiency and helpfulness regarding all administrative matters.

In my last year at the DAp, a big climate thing happened -I don't mean global warming itself, though I suppose it's a big climate thing, and it was certainly happening during my last year at the DAp -where a few colleagues realized we should talk and do more. I hope they can keep doing what is already happening -the seminars and small actions -and hopefully a lot more, but for now, I would just like to give them my thanks. Maybe a special, nominative one to J ér ôme -a thanks and a blame, really, for making me the second best beard in the building.

Thanks to Luca, Fran and Theo for being amazing friends. I have been so verbose, this one sounds rather short, but it is no way indicative of how much I mean it.

Thanks to Christian -I feel like I've already given a great many thanks related to quality "chats" and "conversations," and all deserved. But those Christian brought, or contributed to, are choicest among all the quality I was exposed to. Thanks for ruining Jay-Z and pandas for me, man. Sigh. Now, we've all heard it: we are nothing but stardust. Or, well, I suppose, we are mostly stardust. Or, well, I suppose, everything in us that is not hydrogen is, maybe, stardust. . . ? Or, I mean, surely life as we know it would have never led to you reading and me writing those lines, if not for the Sun, a star. . . ! Stars are important. Actually -and this is a bit of a spoiler for the rest of this here book, but stars are super important for building a PSF model. So, stars are cool (well...). And what are stars? How do they form?! I don't know (it's gas collapsing.), but Vicki does -or, well, I suppose she doesn't know either, or she'd not be researching it, would she? But even if not for the stars, I'd like to thank Vicki. For the friendship and conversations and all that, for the ink and the eternal -few things, if any, are truly eternal, but as eternal as anything directly related to my physical vessel will ever get -artwork we've built. Now, beyond DAp is CEA, and I would like to thank CEA as a whole for making this thesis possible.

My thanks as well to CNES, for funding this thesis, and the rest: the first "JC" were incredible, allowed me to meet some of the below-mentioned wonderful people, and, if I had not happened to already be a bit of a space-nerd -which I most definitely was -it might very well have turned me into one. The second were even better. I'd like to thank Olivier for being a great CNES "correspondant1 " -for his support and words of encouragement during our more official meetings, and for his never-failing interest in my work when we chanced upon one another on other occasions. Thanks to Philippe for, from what I can tell from our few meetings2 , his similarly high levels of interest and benevolence.

Thanks to Myriana for taking care of us this whole time, and to her and the rest of the organizing committee for the -I cannot stress this enough -inspiring CNES events I was lucky enough to attend during my PhD.

On the topic of CNES events, thanks to Michel for his candor and approachableness during those same events. viii Thanks to my fellow PhD students I was lucky enough to meet there: Selma, Victor, Max, Jay-Bee, Matteo (why would you eat a tomato, Matteo? A TOMATO!!), Ismael, Blandine and all her pet bears, Cyril, and all the rest.

On the topic of CNES people, here's a great segue into the next unofficial subsection (at this point -and I'm nowhere near done -maybe I should have made them official) of acknowledgments: Rodolphe. I would like to give another infinite amount of thanks to Rodolphe, for being the mastermind behind so many of the venues that made my Euclid life -both scientific and human -incredible those last three years. Chief among these: the Table Rondes of the Euclid Summer Schools.

Thanks to C éline and Th éo -and I am not going to say Martin again because, as the careful reader may have noticed by now, I am trying to name each person once and only once, which forces my hand into making both odd omissions and agile throwbacks -for the amazing times and good science.

Thanks to the rest of the Euclid Summer School organizing committee -Alain, of course, and I suppose I am going to be a little anachronous here, but this tends to happen when a mortal witnesses the beginning of things, to Bogna and St éphane as well. Those three sessions3 of the school taught me loads (and there were loads to be taught, trust me), but also allowed me to meet some of the funkiest members of the Youth Within Euclid 4 .

Thanks to Michel-Andr ès, Tuan, Paul, Paulo (hipsterer than I will ever be, try as I might not), Florian, Jenny, Isaac, and la "team des Marseillais" (in Frenglish in the original text): Marie, Alex, Sylvain, Adam, Philippe, and Pierros. Thanks to Calum (Calum Calum Calum Calum), C-A, Loulou, Mehdi, Romain, Miguel and Rapha ël.

Thanks to Manu, Flo, and Thibaut for cofounding the very best game that mankind ever came up with 5 . And for the brilliant times we had playing it.

Thanks to Vero for being incredible, as a person, in general, but also as our host in 2017. Thanks to the Winch and all its staff6 for 2018. Now, 2018 was the very best session in many regards -but this is not about the Euclid Summer School, it's about me being thankful for people that helped during my thesis. In 2017, five souls found themselves discussing life, the Universe, music, and a lot of other stuff. It was not all discussing either, we sometimes drew circles in the sand and all that. Those five people I'd like to give special thanks to -wait, no, four people, I'm one of the five. Tguy the philosopher. The other Thomas, who brought into my life what people further down this lengthy note of thankfulness and I later would later come to re-dub "Le Jeu Irlandais". Axel (t'as cru que je t'avais oubli é, hein ?) and his love for flatearthers and UFOlogists alike. And of course, Sylvain, our very own Lemaître. We were mates before Euclid schools, and I daresay we shall remain mates after. Now, as Chapter 4 will show you (I mean, if you're here because you plan on reading this cover to cover, at least), a great good part of my thesis work was more applied maths than applied cosmology. In this time, I came to meet, interact, collaborate, and eventually co-build a huge thing with several brilliant people.

I would like to give especially warm thanks to Matthieu, for our countless email conversations, then Slack conversations, then, phone conversations7 .

Thanks to David, and especially to Nicolas, who started the whole game before Fred and I even knew it was Wasserstein Dictionary Learning we wanted to do. ix Thanks to Marco for -well, for [START_REF] Cuturi | Sinkhorn distances: Lightspeed computation of optimal transport[END_REF], for starters. And then, for being a wonderful collaborator -not just in the science, but even in the writing thereof.

Thanks to Gabriel for being ridiculous -this is the third (I think?) time I use this adjective in a very flattering way, but I mean it. Gabriel is a ridiculous researcher, in all the best ways possible. Here, since I already referenced a paper, take a look at equations (4.11-4.13). I bothered Gabriel so much with these ones 8 . Gabriel was once described to me -by someone I won't name -but I will say I might have thanked him.her.them already, maybe -as "probably the greatest contemporary applied mathematician." Despite that, and the fact you know that that one thing he's working on with you is but one of the seven hundred projects he's actively involved in today, he will still take the time -however long you need -to discuss that extra term in (4.11-4.13). So, thanks, Gabriel! On a completely unrelated note, but before I move on, I would like to thank all members of the Cosmostatistics Initiative, especially fellow CRP#6 participants, and even more especially Emille, Alberto, and Raphael.

Thanks to the Kingscrew: Badri, Isaac, Adarsh, Isma ël, Agus, Franc ¸ois, and of course Gilles, for making my very first conference memorable. I do believe this concludes the "professional" part. Now, a thesis -or any research work for that matter -is not just about the people you interact with professionally. In fact, among the people named beyond, some would gladly point out how a lot of "great" astronomers and physicists would not have been quite so great without the help of other humans history may not remember quite as vividly. Great or not, I would have most definitely not made it here if not for all my wonderful friends.

Thanks to Albert for Albert's and to Joce and Juan for la Bodega. This is as good as any another spot, so here's to him.her: I'd like to thank Marianne, for his.her everlasting friendship. I'd like to thank him.her for the art though ah, I suppose I'm not the only slacker around here, eh?

Le Club Social might be dead -longue vie au Club Social ! -but it certainly hit its golden age during the time I was working on this thesis. You all are special to me -and most of you were before this whole thing -but, as I hand you my thanks, I hope you know the thing 9 , dead as it may be, really meant a lot to me.

I therefore would like to thank Seigneur Lapinier of House Faucheuse, Leo Longthorn, Lady Rose and Ser Cavalier of House Brouzesse.

I would also like to thank our wonderful pledges: Nat, who was to be the second of the order of Z, Seg the Capitalistus (who taught me how to buy $TSLA -right this instant, this was a good thing), and Marion, soon-tobe (in Club Social Terms, no pressure otherwise) of the House Faucheuse, who helped us push the boundaries of le Club Social, literally and figuratively.

First Lady of the Second Sun, aka Dame Lao -earlier I was rambling about climate. Dame Lao has certainly been another staple in my recent awaking. Thanks to her for that, apologies also for that one time the padawan thought he knew better than the master -and see you in America! I'd like to thank Milady of Memoria, aka T ét ée Matinale 10 , always kind of implicitely number 3 of le Club Social -though there was of course never any numbers since there was never any hierarchy. Our friendship started very early in my Parisian life, something about makeup and collecting certain kinds of bottles, long before there was a Club Social, and never ceased to grow since then.

Thanks to the Countess of House Faucheuse as well -though it is perhaps best not to dwindle on the early days of our friendship, I can similarly say it's only grown stronger over the years.

De telles mesures cosmologiques, bas ées sur le lentillage gravitationnel, ont d éj à ét é effectu ées depuis le sol et avec le t élescope Hubble. C'est également l'un des deux objectifs scientifiques principaux du t élescope spatial Euclid, de l'Agence Spatiale Europ éenne, dont le lancement est pr évu en 2022. Euclid observera la presque-totalit é du ciel extra-galactique, et nous permettra ainsi d'obtenir des contraintes extr êmement fortes sur les valeurs des param ètres cosmologiques... A condition que l'on arrive à mesurer pr écis ément la forme de plusieurs milliards de galaxies.

Cette mesure s'av ère extr êmement difficile en pratique, principalement à cause de la fonction d' étalement du point (PSF, pour Point Spread Function en anglais). Toute observation faite à travers un instrument optique est l ég èrement flout ée. Ainsi, si un objet devait apparaître comme un point isol é, on l'observerait plut ôt comme une t âche l ég èrement étal ée. C'est cet effet qu'on appelle PSF. Ses origines sont diverses : diffraction, imperfections dans l'optique de l'instrument, turbulences atmosph ériques (pour les t élscopes au sol), etc. L'impact de la PSF sur la forme des galaxies est beaucoup plus important que celui caus é par le lentillage gravitationnel. Il est donc crucial de corriger tr ès pr écis ément cet effet. Pour ce faire, il faut d'abord connaître la PSF elle-m ême. Dans le ciel, les étoiles non-r ésolues devraient apparaître comme des points ; aussi donnent-elles une mesure de la PSF.

xiv

Estimation du champ de PSF

Cette th èse porte sur le probl ème d'estimation du champ de PSF : à partir d'images d égrad ées d' étoiles, comment reconstruire un mod èle de PSF qui pourra ensuite être utilis é pour la mesure de forme de galaxies ? Nous nous int éressons en particulier à la r ésolution de ce probl ème dans le cas d'Euclid. La variation spatiale de la PSF, c'est-à-dire le fait que la PSF varie en fonction de la position de l'objet dans l'image, était d éj à pr ésente dans toutes les études pass ées de lentillage gravitationnel. En raison des sp écificit és d'Euclid, la mod élisation de sa PSF demande en plus de r ésoudre de nombreux d éfis qui n'avaient pas ét é rencontr és auparavant. En particulier, la PSF sera sous-échantillonn ée et subira de fortes variations chromatiques.

Nous proposons l'utilisation d'outils avanc és, issus des math ématiques appliqu ées et du traitement du signal, pour relever ces d éfis. Pour contrecarrer le sous-échantillonnage, c'est-à-dire le fait que les pixels du d étecteur de l'instrument visible d'Euclid sont "trop gros" pour capturer tous les d étails de la PSF, et les variations spatiales, nous étendons la m éthode RCA (Resolved Components Analysis, en anglais), d évelopp ée r écemment au CEA. En utilisant les notions de repr ésentation parcimonieuse et de th éorie des graphes, nous construisons un mod èle de PSF qui permet de proc éder à la super-r ésolution (c'est-à-dire de retrouver de l'information contenue dans des pixels plus fins) d'images bruit ées d' étoiles, et qui capture les variations spatiales de la PSF se produisant à diff érentes échelles.

Pour étudier la qualit é de ce mod èle et le comparer à l' état de l'art, nous r éalisons un grand nombre de simulations d'images, non seulement d' étoiles, mais également de galaxies. Cela nous permet d' étudier l'impact des erreurs commises dans l'estimation de la PSF sur notre estimation de la forme des galaxies. Nous montrons ainsi que cette propagation d'erreur s'av ère, dans le cas d'Euclid, plus complexe qu'anticip é. En particulier, le formalisme largement utilis é dans la communaut é jusqu'ici pour propager les erreurs de PSF ne sera alors plus valable.

L'instrument visible d'Euclid couvre une tr ès large bande du spectre électromagn étique : d'environ 550 à 900nm en longueur d'onde. Contrairement aux études pr éc édentes, o ù les observations utilis ées pour le lentillage gravitationnel étaient effectu ées à travers des filtres beaucoup plus fins, il devient donc capital de prendre en compte les variations chromatiques de la PSF. L'objectif est alors de construire un mod èle à trois dimensions : les deux dimensions spatiales habituelles, ainsi que la longueur d'onde. C'est un probl ème extr êmement difficile à r ésoudre, puisque nous ne disposons pour chaque étoile que d'une seule image qui, plut ôt que d' être prise à une longueur d'onde particuli ère, est int égr ée avec un spectre, propre à l' étoile !

Transport optimal

Pour faire face à cette tr ès grande d égradation de l'information, nous proposons d'utiliser le transport optimal num érique. Le transport optimal est une branche des math ématiques qui pr ésente un grand int ér êt th éorique depuis plusieurs si ècles. On attribue souvent son origine à Monge, qui en 1781 proposait d' étudier les probl èmes de transportation de masse : étant donn ées deux configurations de masse (par exemple, un tas de sable qu'on d ésirerait utiliser pour remplir un trou de m ême volume), et connaissant l'effort associ é au d éplacement de masse, quelle est la mani ère optimale (c'est-à-dire associ ée au moindre effort) pour passer d'une configuration à l'autre ?

Jusqu' à r écemment, le calcul des quantit és associ ées aux probl èmes de transport optimal était trop co ûteux pour qu'elles puissent être utilis ées dans des probl èmes pratiques. Depuis, des m éthodes pour calculer efficacement des approximations de ces quantit és, comme celle propos ée par Cuturi en 2013, ont rendu possible l'av ènement du transport optimal num érique. On peut ainsi, par exemple, calculer tr ès rapidement le barycentre de Wasserstein de plusieurs images. On peut songer au barycentre de Wasserstein comme les diff érentes étapes interm édiaires par lesquelles passent notre tas de sable au cours de son transport. C'est un op érateur qui permet ainsi de capturer les d éformations g éom étriques s éparant plusieurs objets.

Nous proposons d'utiliser ces notions pour capturer les variations chromatiques de la PSF d'Euclid. En combinant les outils, bas és sur le transport optimal et d évelopp és dans cette th èse, avec les fondements de la m éthode RCA, nous cr éons le premier mod èle permettant de mod éliser de mani ère polychromatique la PSF Chapter 1

Introduction

In 1915, Einstein introduced the theory of General Relativity (GR) that would come to have a huge impact on our understanding of physics and the Universe. This year, just over a century after Einstein's presentation at the Prussian Academy of Sciences, the team of the Event Horizon Telescope revealed the first direct image of a black hole's shadow. This came very shortly after another validation of GR, right before I started the PhD work that will be presented in this thesis: in February of 2016, the LIGO collaboration announced the first detection of gravitational waves.

Long before these observations, the application of GR to the Universe as a whole had already laid the foundations for what would become modern cosmology. A picture of the history of our Universe, from its beginnings -the Big Bang -to the present day started to emerge. From these early days, we eventually reached an era of observational cosmology. Much like astronomers and astrophysicists had already been doing, the different models and predictions of cosmology could now be put to the test with actual observations of our own Universe -notably, in the 1990s, the COsmic Background Explorer (COBE) gave us a wealth of cosmological insight from measurements of the Cosmic Microwave Background (CMB).

It is also thanks to observational evidence that two key components of our current understanding of the Universe came to our consideration. First, several different observations indicated that ordinary matter alone could not explain all of the gravitational effects we observed. This led to the addition of dark matter, which interacts gravitationally but emits no light, as one of the main components of our Universe. Dark matter is in fact much more prominent than ordinary matter, by about a factor of five in its contribution to the total energy content. Second, Hubble noticed that the farther away galaxies are, the faster they appear to move away from us: not only is our Universe expanding, but this expansion is accelerating. Dark Energy is the name we gave to the force responsible for this acceleration.

These three components -GR, dark matter and Dark Energy -are the pillars of the Standard Model of Cosmology. This model is remarkably well supported by observational evidence, yet several issues still need to be addressed. The nature of dark matter and dark energy remains a mystery. Is the latter truly nothing but a cosmological constant? While this possibility is not ruled out by present observations, it would come with questions of its own. Why this particular value, conspicuously close to 0? It also is, to many, a deeply unsatisfying answer from a theoretical standpoint. Moreover, as our cosmological probes reach ever higher levels of accuracy, potential tensions start to emerge -that is, measurements of the same quantity, from two independent sources, that would be in contradiction within the Standard Model. At the time of the writing of this thesis, the most notable is that related to H 0 , the rate of the expansion of the Universe. Measurements, made either directly from supernovae or indirectly from the latest CMB data, appear strongly at odds with one another. Another potential tension is related to dark matter and its distribution. Its significance is less certain, but the sources of the potentially conflicting measurements are particularly relevant to this work: one comes from the Planck mission and its CMB measurements, while the others are made from the study of weak gravitational lensing -the heart of this thesis.

Gravitational lensing, another effect predicted by GR, can lead to spectacular effects. For instance, in an Einstein Ring, what should be a simple background object appears as a ring-like structure around a massive foreground object. In the weak (gravitational) lensing (WL) regime, these effects are of a much smaller amplitude, and cannot be discerned by eye. In this case, no information can be gleaned on an object-by-object basis, but a statistical study of the (observed) shapes of a large number of objects can reveal information about the late-time Universe, and especially about the distribution of matter (dark or otherwise). This makes WL a very powerful cosmological probe. 1 For our observational efforts to address some of today's most pressing questions in cosmology, whether it is the nature of Dark Energy or the possible tensions between different probes, we must achieve exquisite measurement accuracy over very large portions of the sky and/or for very large numbers of objects. These ambitious goals make up what is often referred to as precision cosmology. After Planck and the CMB, we must now bring WL to this new level of sky coverage and precision. That is one of the main goals of the Euclid space mission, expected to launch in 2022.

Until then, we can turn our efforts to some of the many data processing challenges that come with any WL survey, as well as some of the new ones that will arise specifically in the case of Euclid. Precision cosmology is not just about converting "observables" to cosmological information -care must also be given to how we go from the actual observations (raw images from our telescopes) to the quantities of interest (galaxy shapes that contain the WL signal, in our case). Throughout these various steps, many challenging problems arise, some of which we can only hope to solve by deploying advanced signal processing methods.

Amongst the most major of these challenges is that of the Point Spread Function (PSF). Every astronomical image is distorted because of various effects: diffraction, imperfect optics, atmospheric effects (for groundbased telescopes) or the slight jitter of the instrument (when in space). In the case of WL, where the signal of interest lies in the shapes of galaxies, it is naturally of paramount importance to correctly account for the distortions caused by the PSF. This, in turn, can only be achieved if our knowledge of the PSF itself is sufficient. The PSF estimation problem is the main focus of this thesis, with a special emphasis on the Euclid Visible instrument (VIS).

Finding an adequate PSF model from the objects found in Euclid exposures amounts to solving an ill-posed inverse problem. Within this framework, we will use advanced mathematical signal processing tools to try and achieve the best possible PSF model that is able to account for all of Euclid's specificities. Super-resolution, spatial variations, and chromatic variations of the PSF will be addressed in this thesis. Each of these subproblems associated with the Euclid PSF will lead us to delve into advanced and exciting methodological tools. Sparsity, (a small amount of) graph theory, and especially Optimal Transport (OT) will all come together as we get closer to a non-parametric PSF model applicable to Euclid.

This thesis is organized as follows. Starting from the very general, in Chapter 2, we will give some cosmological context, then narrow our attention first to lensing as a cosmological probe, then specifically to PSF modelling and Euclid. We will then start our PSF modelling efforts in Chapter 3, in a simplified context where the chromatic variations of the PSF will be left aside. Before turning to these, we will first take a look at the recent field of numerical optimal transport in Chapter 4. These tools will then be incorporated in our PSF model in Chapter 5, where we will add an OT component to our monochromatic model to make it the first non-parametric PSF model able to capture chromatic variations.

Chapter 2 In this chapter, we present the cosmological context of this thesis. Starting with a general presentation of the standard cosmological model as it stands at the time of this writing, we then quickly narrow our attention to the particular cosmological probe of interest for this work by giving the basic lensing formalism on which WL experiments and results are based. By the end of this chapter, we will have established the role of the PSF in WL studies, the importance of accurately modelling it, and the challenges encountered in the particular case of Euclid. It should be noted that, while we use the standard model and the estimation of its parameters as the cosmological motivation for this task, WL can absolutely also be used to constrain exotic Dark Energy or Modified Gravity models. Similarly, in the present chapter, we will introduce and focus on cosmic shear as the way to exploit WL observations. They can however be used in numerous other ways, both for cosmological inference, and to achieve different science objectives. In all cases, the PSF model used is crucial, and can lead to severe systematic errors.

Cosmological and practical context

The standard cosmological model

We start by giving a brief overview of our current understanding of our Universe and its history, as summarized in Figure 2.1. It begins about 13.8 billion years ago with a singularity in space-time, famously known as the Big Bang. Shortly thereafter, a period of exponential expansion, called inflation, occurs. It ends when our Universe is but 10 -32 seconds old, yet that is enough to expand small quantum fluctuations into the footprints of what will ultimately allow for the creation and growth of structure. Following the inflation, all of the Universe's components live in a hot plasma. In particular, this means photons are coupled to baryonic matter, and are not free to escape for about 380, 000 years. During this time, as the Universe expands (albeit at a much slower rate than during inflation), it cools down. 380, 000 years marks the time when the Universe's expansion causes it to fall below a temperature of around 4000K, which allows for recombination: electrons and protons combine to form (hydrogen) atoms, and the photons are free to escape for the first time. Some of these photons can be observed today in the microwave domain, and constitute the CMB. Observations of the CMB contain a wealth of cosmological information, making it one of the main cosmological probes.

Following the emission of the CMB photons, as the Universe continues slowly expanding, the small anisotropies imprinted by inflation lead to the creation of structure. These structures are mostly governed by the gravitational action of dark matter particles. After several hundred million years, enough ordinary matter falls into these dark matter(-dominated) structures to start forming stars, and eventually galaxies. This marks the end of the period ominously called the Dark ages, as these new objects start emitting photons. These, in turn, cause some electrons to be stripped from atoms that had been neutral since recombination, an event called reionization. While these first stars have not yet been observed by mankind, as time goes on and more of them form, we eventually start seeing more and more of these galaxies, which then act as tracers allowing us to indirectly observe the Large Scale Structure (LSS) of the recent Universe. In the present day, this LSS appears as the beautiful cosmic web that can be seen toward the right-hand side of Figure 2.1: central, dark matter halos are connected by filamentary structures of dark matter. Within these, structure can now be discerned even when observing ordinary matter, as galaxies themselves gather in gravitationally-bound clusters.

One last cosmological landmark worth mentioning here occurred only about 4 billion years ago1 . The Universe had been in the matter-dominated era until then (and ever since it was only a few 10 4 years old, before which it was radiation-dominated). Starting then, our Universe entered the present era of Dark Energy domination, in which its expansion is accelerating.

We give in the following subsections some very brief insight into how the picture we have just presented is built, starting with some necessary basic notions in the underlying theory it is built upon: GR [START_REF] Einstein | The foundation of the general theory of relativity[END_REF]. Much like measuring the CMB makes it possible to impose constraints on our Universe and its history, the LSS of the recent Universe makes for a rich vein of cosmological information. In Section 2.2, we will dive into WL, one of the main ways to probe this LSS.

General Relativity

Classical physics consider a 3-dimensional (3D) space, wherein systems may evolve with time. In GR, a 4dimensional spacetime is considered instead, the local geometry of which is then entirely defined through

ds 2 = 3 µ,ν=0 g µν dx µ dx ν := g µν dx µ dx ν , (2.1)
where g µν is the metric tensor and the index of coordinates x µ varies from 0 to 3 (with µ = 0 corresponding to the time coordinate, and 1 ≤ µ ≤ 3 to space). Through the second equality, we implicitly define the Einstein summation convention, wherein repeated indices are summed over. We shall use this convention for the In classical physics, and in the absence of influence of any external force, the movement of particles through time occurs along straight lines. By analogy, in GR, the motion of particles is described via the geodesic equation,

d 2 x µ dλ 2 + Γ µ αβ dx α dλ dx β dλ = 0.
(2.2)

Since we now consider time to be one of the dimensions of spacetime, we use an increasing scalar λ (rather than time t) to parametrize the evolution of our particle across all 4 dimensions. Γ µ αβ are the Christoffel symbols and depend only the chosen metric:

Γ µ αβ = g µν 2 ∂g αν ∂x β + ∂g βν ∂x α - ∂g αβ ∂x ν .
(2.3) Equation (2.2) gives us the GR equivalent of the equation of motion: instead of moving across space in a straight line, our particles will now move along the geodesics of the curved spacetime. The last element we need is the origin of this curvature when we add content to our system; this is described by the famous Einstein field equations:

G µν = 8πG c 4 T µν , (2.4)
where G µν is the Einstein tensor which, once again, is only a function of metric g µν , G is Newton's Gravitational Constant, c is the speed of light, and T µν is the energy-momentum tensor that describes said contents.

The isotropic, homogeneous Universe

GR-based cosmology amounts to applying the theory to the Universe as a whole. If we are to find solutions to (2.4) in this context, we need further assumptions. We will thus assume the Cosmological Principle to hold true. It states that the Universe is isotropic and homogeneous -a reasonable assumption at large scales.

Actual observations of the CMB, for instance, confirm the Universe we live in is indeed very homogeneousalmost alarmingly so, as we shall discuss shortly. Of course, this is clearly no longer the case at the scales we experience daily. We will address the issue of structure formation in Section 2.1.4. For now, let us simply assume the cosmological principle to hold true. It can then be shown that the metric is unique, called the Friedmann-Lemaître-Robertson-Walker (FLRW) metric, and allows for (2.1) to be written as:

ds 2 = -c 2 dt 2 + a 2 (t)dl 2 , (2.5)
where a(t) is the scale factor. As first suggested by [START_REF] Lemaître | Un univers homog ène de masse constante et de rayon croissant rendant compte de la vitesse radiale des n ébuleuses extra-galactiques[END_REF], there is very strong evidence that our Universe is expanding. A typical, yet useful illustration of this expansion is that of a sheet of graph paper: as shown in Figure 2.2, suppose two galaxies MW and A lie (motionless) at the intersections of two consecutive vertical lines. Their distance, as measured in units of the graph paper's squares, would be χ = 1. If the graph paper itself was to expand with time, the physical distance (red arrow) between our galaxies would increase with time; yet, since they are motionless, they would remain on the same nodes of the graph paper, therefore still be separated by a "graph paper unit" distance of χ = 1. For this reason, we call χ the comoving distance. The physical distance between MW and A would then be some function of time, a(t), describing how the expansion of our graph paper takes place -this function is none other than the scale factor we came across in (2.5). Back to equation (2.5), the line element dl 2 can be further decomposed by making use of the comoving distance:

dl 2 := dχ 2 + f K (χ) 2 dω.
(2.6) f K is the comoving transverse distance, related to the geometry of the Universe, parametrized by K,

f K (χ) :=              K -1/2 sin K -1/2 χ for K > 0 (spherical) χ for K = 0 (flat) |K -1/2 | sinh |K| -1/2 χ for K < 0 (hyperbolic).
(2.7)

The combination of some of our latest cosmological observations (Planck Collaboration et al., 2018) seem to indicate we live in a flat Universe, and place strong constraints around the value of K (or rather, Ω K , which we shall define shortly). In the particular case where we consider the Universe to be exactly flat, (2.5) gives us this explicit expression for the metric tensor:

g µν =                -c 2 0 0 0 0 a 2 (t) 0 0 0 0 a 2 (t) 0 0 0 0 a 2 (t)                . (2.8)
So far, we have made use of the Cosmological Principle to simplify the geometry of the Universe, i.e., the lefthand side of (2.4); another of its consequences is that we can treat the contents of the Universe as a perfect fluid, entirely characterized by

T µ ν =                ρ(t) 0 0 0 0 p(t) 0 0 0 0 p(t) 0 0 0 0 p(t)                , (2.9)
where ρ and p are, respectively, the energy density and pressure of said fluid.

Making use of both the FLRW metric and this energy-momentum tensor, the Einstein field equations (2.4) can be simplified, through the 00-component and the trace respectively, to yield the Friedmann equations:

ȧ a 2 = 8πG 3 ρ - Kc 2 a 2 ,
(2.10)

ä a = - 4πG 3 ρ + 3p c 2 .
(2.11)

In the above expression, we have omitted the time dependency for readability, and introduced the usual ẋ := dx dt notation for time derivatives.

Let us now define two important quantities. First, the Hubble parameter (or Hubble rate), as

H(t) := ȧ(t) a(t) .
(2.12)

By convention, we set the value of the scale factor today at a(t 0 ) = 1. This, in turn, allows us to define the Hubble constant as H 0 := H(t 0 ) = ȧ(t 0 ), often parametrized via the reduced Hubble constant2 , h, as follows:

H 0 := 100h km sec -1 Mpc -1 .
(2.13)

The Hubble parameter (resp. Hubble constant) gives a measure of the rate (resp. speed) of the expansion of the Universe at a given time t (resp. today).

Second, we can see from the first Friedmann equation (2.10) that there exists a specific value of the density for which the term related to curvature K vanishes; let us define this quantity, at present time, as the critical density

ρ c := 3H 2 0 8πG .
(2.14)

Combining (the derivative of) (2.10) and (2.11), we get, omitting time dependencies again, the following conservation law:

ρ + 3 ȧ a (ρ + p) = 0.
(2.15)

Considering (2.15), it shall behoove us to define the Equation of State (EOS), relating the energy density and pressure through a parameter w, as p = c 2 wρ.

(2.16)

While we have, once again, omitted the time dependency in (2.16), w could in principle vary with time, though that is not the case for the components of our Universe we are most familiar with. On the topic of components, now is a good time to remark upon how, starting from the energy-momentum tensor in (2.4), we have, so far in this section, considered the constituents of the Universe to make up a single, perfect fluid. As can immediately be established simply by gazing around us, that is, of course, not true of our own Universe, composed of varied and different constituents -matter and light, at the very least. Much like we shall go beyond the smooth Universe we are currently describing in Section 2.1.4, we shall return to the issue of these different constituents in Section 2.1.5.

For now, let us simply consider a certain number of them, each component α having its own energy density ρ α , pressure p α , and EOS parameter w α . It shall prove useful to scale the present-day3 density by that of the critical density defined in (2.14),

Ω α := ρ α (t 0 ) ρ c .
(2.17)

Let us now divide the first Friedmann equation (2.10) by H 2 0 and rewrite it when considering several components: (2.18) which, evaluated at t = t 0 , yields α Ω α + Ω K = 1, where we have defined

H 2 (t) H 2 0 = α Ω α - Kc 2 H 2 0 a(t) 2 ,
Ω K := Kc 2 H 2 0 . (2.19)
This allows for the curvature to be treated, after a fashion, as an extra constituent of the Universe. For a flat Universe, both K and Ω K are equal to 0, and the Ω α 's are direct indicators of the relative contribution of each component to the overall energy density of the Universe today.

Redshift

Much like the sound of an ambulance speeding away from the observer is altered by the Doppler effect, the expansion of the Universe causes an alteration to the wavelength of light that reaches us. We call this alteration redshift: as distant objects are moving away from us, the wavelength of light in the visible domain is shifted towards the red. Let us denote λ obs the wavelength at which we observe light originally emitted at wavelength λ emit . Formally, we define redshift as

z = λ obs -λ emit λ emit .
(2.20)

For light emitted at time t, we have:

λ obs λ emit = a(t 0 ) a(t) .
(2.21)

Recall that by convention, a(t 0 ) = 1; combining (2.20) and (2.21) allows us to give a simple relation between scale factor and redshift:

a = 1 1 + z .
(2.22)

Beneath these simple relations lies one of the reasons redshift has come to be such a central concept in cosmology. As our illustration in Figure 2.2 showed, there is a direct relationship between time t and the scale factor a(t): as the latter monotonously increases over time in an expanding Universe, one can equivalently use time or the value of the scale factor at that time to determine a certain point in the history of the Universe. Similarly, (2.22) allows us to use redshift to that end. Within a given cosmological model, the redshift of an object is then also a measure of its distance to the observer: consider the observable Universe as a sphere, with us (the observer) at its center. For any angular direction on our sky, redshift can be used as the unit along the radial axis, or depth.

We have already introduced the comoving distance, χ, in Section 2.1.2. Let us now derive the relation between χ and z. From the FLRW metric (2.5) and (2.6), we get dχ = c a dt.

(2.23)

By definition of the Hubble parameter (2.12), we have:

dt = da aH(a)
.

(2.24)

Combining the two yields

χ(a) = 1 a cda a 2 H(a ) ,
(2.25)

or, using (2.22),

χ(z) = z 0 cdz H(z ) .
(2.26)

Structure formation

In Section 2.1.2, we described an homogeneous, isotropic Universe. While this is a good description of our own Universe at very large scales, it obviously no longer holds true at smaller scales -the very existence of our galaxy being a blatant statement to local inhomogeneity. As we mentioned at the beginning of this chapter, these present-day features of our Universe are believed to have originated with a brief period of inflation that occurred during the first few instants of its infancy, and allowed for small quantum fluctuations to be expanded into the seeds that would grow into the structure we observe today.

Beyond providing the link between the smooth and inhomogeneous appearance of our Universe at large and small scales, respectively, inflation theory is appealing in that it gives an elegant explanation to two other puzzling realizations we have come to make. First, the flatness problem: as already mentioned, observations indicate we live a fairly flat Universe, which would imply that it was extremely flat in the past. A period of exponential inflation would naturally lead to a dilution of the curvature, giving an explanation for the low values of Ω K , both at present days and in the early, post-inflation Universe. Second, as we alluded to in Section 2.1.2, our observations at large scales reveal a surprising isotropy of the Universe. In the temperature of the CMB, in particular, the anisotropies are incredibly small, including when looking at portions of the sky that should have never been causally connected! This is referred to as the horizon problem: while we can see photons from the CMB in two opposite directions of the sky, their respective regions of origin should be beyond the other's horizon, and there is thus no reason to expect their temperatures to be so similar. Once again, inflation provides an explanation: these regions only found themselves beyond each other's horizon because of it, but were causally connected before. Finding appropriate inflation models, and the search for signatures of this key component of our modern understanding of the Universe are some of the highest stakes in modern cosmology.

Let us define the matter density contrast,

δ(r, a) := ρ(r, a) -ρ(a) ρ(a) , (2.27)
where ρ is the matter density and ρ its average at a given scale factor. When considering either early enough times, or large enough scales, the evolution of δ can be described by Linear Pertubation Theory. If we consider matter as an ideal, pressureless fluid, the evolution of δ on scales less than the horizon can be described by Newtonian physics [START_REF] Peebles | The large-scale structure of the Universe[END_REF]. One particular consequence worth highlighting now, as it will prove useful to our derivations in the next chapter, is that it then verifies the Poisson equation,

∇ 2 Φ = 4πGa 2 ρδ, (2.28)
where Φ is the Newtonian gravitational potential. Under these assumptions, the linear evolution can further be shown to follow a differential equation,

δ + 2H δ -4πG ρδ = 0.
(2.29)

For a derivation of (2.29), and other details on linear perturbation theory, we refer the reader to standard cosmological textbooks such as the [START_REF] Dodelson | Modern Cosmology[END_REF]. For our purposes, it shall be sufficient to point out that from this simple expression, one can see that the Hubble parameter H will have a damping effect on the growth of structure, which perfectly aligns with our intuition: the expansion of the Universe suppresses the growth of structure. When looking at perturbations, an extremely useful tool is the two-point correlation function (2PCF): (2.30) where the second equality defines the angle bracket notation for averaging over r (in what follows, we may omit the variable over which the averaging is done when no confusion is possible). Up to the sign, (2.30) looks exactly like the convolution product of the quantity of interest (δ in our case) with itself; it shall thus often be convenient to work in Fourier space. For any function f : R n → R, let f denote its Fourier transform: (2.31) where • denotes the vector inner product 4 and k the n-dimensional wave vector. The inverse Fourier transform is then 4 That is, a • b := n i=1 a i b i = a b , where is the Hadamard, or element-wise, product. In later chapters, we shall also use the notation a • b := a, b for the inner product; in this chapter, however, we shall prefer the • notation to avoid confusion with the averaging brackets.

C δ (r) := δ(r )δ(r + r) r := R 3 δ(r + r)δ(r )dr ,
f (k) := R n e -ik•r f (r)dr,
f (r) = 1 (2π) n R n e ik•r f (k)dk.
(2.32) With these and the Convolution Theorem (that states a convolution in direct space is a regular product in Fourier space), we can rewrite (2.30) as

C δ (r) = 1 (2π) 3 R 3 e ik•r δ(k) δ(-k)dk = 1 (2π) 3 R 3 e ik•r δ(k) 2 dk.
(2.33)

Instead of the 2PCF itself, it is often convenient to work with the closely related power spectrum: the average, for a given scale k := |k|, of δ(k) 2 across all directions ω, i.e.

P δ (k) := 1 4π δ(k) 2 dω.
(2.34)

In the literature, another common (and equivalent) definition of the power spectrum of a statistically homogeneous and isotropic random field is

δ(k) δ * (k ) ω := (2π) 3 P δ (k)1 {k=k } , (2.35)
where 1 A is the (finite) indicator function5 , equal to 1 if A is true and 0 otherwise.

Going back to the perturbations of interest to us in this section, their scale dependence is often parametrized by assuming the Primordial Power Spectrum (PPS), P P , follows a power law:

P P (k) := A s k k 0 n s -1 , (2.36)
where k 0 is just an (arbitrary) pivot scale, and A s is the amplitude of the PPS and n s is the spectral index, two of the main cosmological parameters in the standard model. Historically, n s was often assumed to be equal to 1.

In other words, the primordial perturbations were assumed to be entirely described by a a scale-independent Gaussian random field. This model, called Harrison-Zel'dovich (Harrison, 1970;[START_REF] Zel'dovich | A hypothesis, unifying the structure and the entropy of the universe[END_REF], is however now strongly excluded by observations (see Section 2.1.5), hence the newfound importance of n s , a measure of how far the PPS deviates from scale invariance, as a cosmological parameter.

If the evolution of perturbation is assumed to be linear, and the initial density field Gaussian, each Fourier mode of the density contrast evolves independently from the others, and their values right after inflation (at a = 0) can be related to those today (a = 1) through the transfer function,

T (k) := δ(k, a = 1) δ(k = 0, a = 0) δ(k, a = 0) δ(k = 0, a = 1) , (2.37)
where k = 0 indicates an arbitrarily large scale. Computation of the transfer function is typically carried out using Boltzmann codes such as CLASS [START_REF] Lesgourgues | The cosmic linear anisotropy solving system (CLASS) I: Overview[END_REF], though analytical fitting formulae (e.g. [START_REF] Eisenstein | Baryonic features in the matter transfer function[END_REF] can also be used if one can get away with lower accuracy. T includes effects from linear pertubation theory and encoded in (2.29), as well as those due to horizon crossing and to Baryon Acoustic Oscillations (BAO). When looking at cases where linear evolution can no longer be assumed (small scales and/or late times), one must turn to other tools to capture the complex dynamics that arise in non-linear structure formation, for instance non-linear perturbation theory (a review of which is given by [START_REF] Bernardeau | Large-scale structure of the universe and cosmological perturbation theory[END_REF], or, ideally, N-body simulations (that can yield corrective terms to be added on top of the linear power spectrum, as is done e.g. by HALOFIT, [START_REF] Smith | Stable clustering, the halo model and non-linear cosmological power spectra[END_REF].

Before moving on to finally giving an overall description of the standard cosmological model, let us finish our study of the inhomogeneity of our Universe with a consideration of its metric (which will come in handy when we revisit the geodesic Equation 2.2 in the context of WL in Section 2.2). At first order, the perturbed metric of an expanding, non-smooth Universe can be described by the addition of the Bardeen potentials [START_REF] Bardeen | Gauge-invariant cosmological perturbations[END_REF] to (2.5):

ds 2 = -1 + 2Ψ c 2 c 2 dt 2 + a 2 (t) 1 - 2Φ c 2 dl 2 .
(2.38)

Ψ and Φ are in general functions of both space and time, describing the Newtonian potential and the perturbation applied to the spatial curvature, respectively. In GR (and in the absence of anisotropic stress), Ψ = Φ (and the notations for Equation 2.38 are coherent with those of 2.28). [START_REF] Giblin | General relativistic corrections to the weak lensing convergence power spectrum[END_REF] compare this linearization with fully non-linear GR simulations and offer corrections for the WL quantities we will introduce in Section 2.2.4.

The ΛCDM Model

The previous subsections provided us with the necessary concepts to establish the current standard model of cosmology we briefly presented at the beginning of the chapter. The different elements that make up this model are as follows.

Matter

The matter content of our Universe is itself divided in two different subtypes. Ordinary matter is made of baryonic elements (and electrons), the majority of which is found in the form of hydrogen. While everything material in our everyday lives is made up entirely of ordinary matter, its relative contribution (Ω b ) to the total energy density of matter (Ω m ) is dwarfed by that of dark matter, roughly five times higher. In the standard model, the latter is also assumed to be non-relativistic, that is, to be Cold Dark Matter (CDM). Their EOS parameter then verifies w m = w b = 0, leading to the following solution of the conservation law (2.15):

ρ m (a) = a -3 ρ m,0 .
(2.39)

Radiation

Next are the relativistic components of our Universe, the majority of which are photons. Relative, massless neutrinos are also considered as radiation. They have an EOS with w r = 1/3, leading to ρ r (a) = a -4 ρ r,0 .

(2.40)

Dark Energy

Recent observational evidence [START_REF] Riess | Observational evidence from supernovae for an accelerating universe and a cosmological constant[END_REF][START_REF] Perlmutter | Measurements of Ω and Λ from 42 high-redshift supernovae[END_REF] has shown our Universe's expansion has recently (on cosmological scales) started accelerating. Dark Energy is the name given to the origin of this acceleration. In its simplest form, Dark Energy is nothing but a cosmological constant6 , Λ. This amounts to a fluid with an EOS characterized by a (constant through time) (2.41) in other words, an energy density that also remains constant with time. The second Friedmann equation (2.11) shows that, by definition of the EOS (2.16), any component with w < -1/3 would lead to an acceleration of the expansion. From that, and the evolution of the energy density parameters (2.39-2.41) of our three constituents alone, we can get a very clear intuition into this recent acceleration that ties into the three main eras in the cosmic history of our Universe: while radiation and matter originally dominated the energy content of the Universe7 , its scale factor was well behaved. As time passed, however, expansion naturally led to their density diminishing. Regardless of how small that of the cosmological constant was initially, the fact it remains constant by necessity meant it was to become dominant eventually -which in our case occurred about 4 billion years ago. Through the definition in (2.19), we saw that we could treat the curvature as "just another component of the Universe." In the case of a Cosmological Constant, that we have here introduced as precisely one of the "regular" constituents, we can do the reverse: let us retrace the steps we took in Section 2.1.2 as follows. First, define the constant itself from its density:

w Λ = -1, leading to ρ Λ (a) = ρ Λ,0 ,
Ω Λ := c 2 Λ 3H 2 0 .
(2.42)

Recall form (2.18) of the Friedmann equation:

H 2 (t) H 2 0 = Ω m + Ω r - Kc 2 H 2 0 a(t) 2 + Ω Λ , (2.43)
or, going back to its original form (2.10), including a generic ρ for the homogeneous fluid content of the Universe:

ȧ a 2 = 8πG 3 ρ - Kc 2 a 2 + c 2 Λ 3 .
(2.44)

If we only add a similar c 2 Λ/3 term to the second Friedmann equation (2.11), we arrive precisely at those we would have derived, using the Cosmological Principle as we did at the very beginning of Section 2.1.2, had we used the Einstein field equations in the following, infamous form:

G µν = 8πG c 4 T µν -Λg µν .
(2.45)

If the two approaches -postulating the existence of a cosmological constant as in this version of the Einstein equations, or considering a fluid with w Λ = -1 -are equivalent, the latter allows for more flexibility. As we have alluded to in the introductory chapter to this thesis, while ΛCDM is currently very well supported by observations, a cosmological constant remains unsatisfying for several reasons. Among them is the actual value such a constant would have: Planck Collaboration et al. (2018) gives Λ = (4.24 ± 0.11) × 10 -66 eV 2 . Much like the extremely small value of K at early times led to the "flatness problem", some consider such a small value for the cosmological constant to constitute a fine-tuning problem.

The most natural way to move away from a cosmological constant is to parametrize w Λ as a (non-constant) function of time. Without any physical insight into the nature of Dark Energy, it is common to turn to the linear parametrization of [START_REF] Linder | Exploring the expansion history of the Universe[END_REF]:

w Λ (a) := w 0 + w a (1 -a).
(2.46)

The cosmological constant case can then be retrieved by setting w 0 = -1, w a = 0.

Massive neutrinos

While arguably already "beyond-ΛCDM" in the strictest sense, no overview of modern cosmology, however brief, would be complete without a mention of massive neutrinos. They naturally have an impact on cosmological considerations (they impact structure formation, for starters) and, conversely, cosmological observations can lead to constraints both on their mass (that are, in fact, extremely competitive with many terrestrial experiments) and on the so-called effective number of species, N eff . [START_REF] Lesgourgues | Massive neutrinos and cosmology[END_REF] give an in-depth review of massive neutrinos in cosmology, while the very recent work of [START_REF] Kreisch | The neutrino puzzle: Anomalies, interactions, and cosmological tensions[END_REF] delves into some ramifications, notably their potential role in some of the cosmological tensions that may be emerging from recent observational data. While we shall not concern ourselves with their impact in the present thesis, it should be noted that WL is sensible to massive neutrinos, and the considerations and issues we will address in this thesis (especially those related to the PSF) in light of the standard model remain of the same relevance if one's interest was centred on cosmology with (or aimed at the study of) massive neutrinos.

Cosmological parameters

We have now introduced all the basic components of our standard cosmological model. Let us now try and find the smallest number of cosmological parameters to describe all of them. We have already introduced the Hubble constant H 0 and the density parameters (at present day), Ω Λ and Ω m , of the cosmological constant and matter, respectively; we shall use these three as-is in our parametrization of ΛCDM. For the amount of baryons in the total matter content, we shall use the common parametrization Ω b h 2 . In Section 2.1.4, we have introduced the PPS, parametrized by its amplitude A s and spectral index n s . While we will keep the latter as a cosmological parameter, rather than A s , let us introduce another parameter that is more commonly found in WL literature. When evaluated at r = 0, the 2PCF of matter density today, as defined in (2.30), directly gives us the variance of the density contrast σ 2 ∞ , (recall that, by construction (2.27), its mean is 0):

σ 2 ∞ := C δ (0) = R 3 δ(r) 2 dr.
(2.47)

It is easy to fathom, from this expression, that this quantity could be divergent. A way around this is to apply some filter W to the density contrast field, and to measure the variance of the resulting smoothed field C δ * W (0), where * is the convolution product. A natural choice for W is to use a 3D-spherical tophat of radius R, that is,

W R (r) := 3πR 3 4 1 {|r|≤R} .
(2.48)

We can finally introduce our power spectrum normalization parameter of choice, that is, the smoothed variance of the 2PCF with radius R = 8Mpc/h,

σ 8 := C δ * W 8 (0).
(2.49)

The last cosmological parameter we need to make up a set well describing vanilla ΛCDM is one we have not encountered at all: the optical depth to reionization, τ. As we briefly mentioned in the introduction to this Whether to achieve either of these goals, or to explore more complicated Dark Energy or Modified Gravity models, it is clearly beneficial to have several independent and highly accurate cosmological probes at our disposal. We have mentioned the CMB and its use as a cosmological probe several times; we now turn to an entirely different one. Where Planck probed the early-time Universe with exquisite accuracy, more upcoming "Stage IV" experiments -Euclid, the Large Synoptic Survey Telescope (LSST), Wide Field Infrared Survey Telescope (WFIRST) and Chinese Space Station Optical Survey (CSS-OS) 8 -shall soon achieve the same with the later time Universe, in great part through the use of WL, which we shall now turn our focus to.

Gravitational lensing

As photons move along the geodesics of spacetime, massive objects can bend their path, much like optical lenses do, giving the phenomenon its name: gravitational lensing. It is often illustrated by analogy with the movement of a marble, launched in a straight direction, on a stretched sheet slightly bended by some massive object laid on it. Just over a century ago, gravitational lensing provided the earliest observational evidence of GR, when [START_REF] Dyson | A determination of the deflection of light by the Sun's gravitational field, from observations made at the total eclipse of May 29, 1919[END_REF] measured its effect during a total eclipse.

When the right conditions are met, for instance when the observer, a massive foreground, and a luminous background galaxies are aligned, gravitational lensing can lead to spectacular displays. In an Einstein ring like the one shown in Figure 2.3, the background blue galaxy appears to wrap around the foreground red galaxy. Such effects make up what we have come to call Strong Gravitational Lensing (see [START_REF] Treu | Strong lensing by galaxies[END_REF], for a review). Several hundred such objects have been found, and future wide surveys like Euclid and LSST are expected to bring our number of detections to the tens of thousands.

In the vast majority of cases, however, the effect of gravitational lensing is too small to be discerned by eye, and has a far smaller impact on the way galaxies appear to us than their intrinsic shape does. But while, in this regime, we cannot infer the contribution of gravitational lensing on the scale of single objects, the statistical study of a large number of galaxies is still a rich source of information about our Universe, its LSS, and especially on how matter is distributed within it. This constitutes the field of WL, the formalism of which we shall now introduce. We will then illustrate how to connect the main WL observable (galaxy shapes) with cosmology through the particular example of cosmic shear [START_REF] Kilbinger | Cosmology with cosmic shear observations: a review[END_REF], that is, the study of spatial correlations of the former.

Propagation of light through an in inhomogeneous Universe

To study how light propagates in an inhomogeneous Universe, following [START_REF] Seitz | Light propagation in arbitrary spacetimes and the gravitational lens approximation[END_REF], let us first consider an arbitrary, fiducial light ray, γ µ fid (λ). Recall from the geodesic equation (2.2) that its path is parametrized by the scalar parameter λ, such that it arrives at the observer at λ = 0. Since we are interested in how inhomogeneities impact the propagation of light, let us consider another light ray, γ µ (λ, θ θ θ), separated from γ µ fid at the observer by the 2-dimensional (2D) angular coordinates θ θ θ = (θ 1 , θ 2 ). θ θ θ would be the apparent position of the source on the sky if that of the fiducial ray was chosen as origin. We want to study the separation between those two rays, which depends on the contents of the Universe they went through, at any arbitrary point λ > 0. For any such, let us consider the 2D separation, ξ(λ, θ θ θ), projection of γ µ fid (λ) -γ µ (λ, θ θ θ) on the 2D screen perpendicular to the The evolution of ξ is described through the following geodesic deviation equation:

d 2 ξ dλ 2 (λ, θ θ θ) = T (X 1 , X 2 , r)ξ(λ, θ θ θ).
(2.50) T is the optical tidal matrix, function of physical spatial coordinates X 1 and X 2 (indicated in black dotted lines in Figure 2.4) within the tangential screen at λ, in which we omit the depedency for readability, and r, the line-ofsight component, orthogonal to said screen. In the case of our perturbed metric from equation (2.38), and if Φ can be considered a weak field9 Φ << c 2 , [START_REF] Seitz | Light propagation in arbitrary spacetimes and the gravitational lens approximation[END_REF] derive the expression of the tidal matrix,

T i j (X 1 , X 2 , r) = - 4πG c 2 ρ0 a 5 1 {i= j} - 1 c 2 a 2 2 ∂ 2 ∂X i ∂X j + 1 {i= j} ∂ 2 ∂r 2 Φ,
(2.51) for i, j ∈ {1, 2}. Note that the left-hand term relates only to the (homogeneous) FLRW background and remains diagonal, while the right-hand term, called the clump contribution, can contain off-diagonal terms that lead to the anisotropic effects we will ultimately measure in WL studies.

Let x x x = (x 1 , x 2 ) := ξ/a the comoving separation vector, and ∇ ⊥ := (∂/∂x 1 , ∂/∂x 2 ) the comoving transverse gradient in the screen perpendicular to our fiducial ray. Injecting (2.51) in (2.50) and writing it in comoving coordinates, we get

d 2 x x x dχ 2 (χ) + Kx x x(χ) = - 2 c 2 ∇ ⊥ Φ(x x x, χ) -∇ ⊥ Φ(0, χ) .
(2.52)

By definition of ξ (and by extension x x x), we have the boundary conditions x x x(χ = 0) = 0 and dx x x/dχ(χ = 0) = θ θ θ.

These give us the solutions to (2.52),

x x x(χ) = f K (χ)θ θ θ - 2 c 2 χ 0 f K (χ -χ ) ∇ ⊥ Φ x x x(χ ), χ -∇ ⊥ Φ(0, χ ) dχ .
(2.53)

In this expression, the (transverse gradient of the) gravitational potential is integrated along the perturbed light ray at x x x(χ ). A 0th-order approximation amounts to integrating along the unperturbed ray, f K (χ )θ θ θ; this is the famous Born approximation, shown (e.g. by [START_REF] Shapiro | The Born and lens-lens corrections to weak gravitational lensing angular power spectra[END_REF] to be extremely accurate for WL power spectrum studies, even in the case of full-sky surveys. Under the Born approximation, (2.53) yields

x x x(χ) = f K (χ)θ θ θ - 2 c 2 χ 0 f K (χ -χ ) ∇ ⊥ Φ f K (χ )θ θ θ, χ -∇ ⊥ Φ(0, χ ) dχ .
(2.54)

Consider a source at distance χ; in the absence of gravitational lensing, it would be observed with an angular separation β β β := x x x/ f K (χ). Dividing (2.54) by the radial comoving distance f K gives us the lens equation:

β β β = θ θ θ -α α α(θ θ θ), (2.55)
where we have defined the deflection angle as

α α α(θ θ θ, χ) := 2 c 2 χ 0 f K (χ -χ ) f K (χ) ∇ ⊥ Φ f K (χ )θ θ θ, χ -∇ ⊥ Φ(0, χ ) dχ .
(2.56)

Shear and convergence

The lens equation (2.55) gives us a mapping from lensed (or "image") to unlensed (or "source") coordinates. In order to arrive at the classical lensing observables, let us now consider the linearization of this mapping. We introduce the (inverse) amplification matrix as the Jacobian

A A A := ∂β β β ∂θ θ θ = I 2 - ∂α α α ∂θ θ θ , (2.57)
where I N is the N × N identity matrix. The right-hand term in the definition of α α α (2.56) does not depend on θ θ θ and will vanish. It is then useful to define the 2D effective lensing potential,

ψ(θ θ θ, χ) := 2 c 2 χ 0 f K (χ -χ ) f K (χ) f K (χ ) Φ( f K (χ )θ θ θ, χ )dχ .
(2.58)

Up to the ∇ ⊥ Φ(0, χ ) term in (2.56), α α α is then the gradient of ψ, and we have

A A A i j := 1 {i= j} -∂ i ∂ j ψ, (2.59)
where ∂ i := ∂/∂θ i . We can now introduce the notions of convergence, κ, and shear, γ, by parametrizing our Jacobian thus:

A A A := 1 -κ -γ 1 -γ 2 -γ 2 1 -κ + γ 1 , (2.60) i.e., κ = 1 2 (∂ 1 ∂ 1 + ∂ 2 ∂ 2 )ψ,
(2.61)

γ 1 = 1 2 (∂ 1 ∂ 1 -∂ 2 ∂ 2 )ψ,
(2.62)

γ 2 = ∂ 1 ∂ 2 ψ.
(2.63)

Convergence is the isotropic change in the observed size of an object, while shear is the anisotropic stretching due to gravitational lensing. The latter is often parametrized as a single complex number, γ := γ 1 + iγ 2 ; its effect on a circular object is shown in Figure 2.5. For this work, we shall focus on the alteration to the shapes of galaxies by gravitational lensing effects.

Since κ only affects their size, let us introduce the reduced shear:

g = g 1 + ig 2 := γ 1 -κ .
(2.64)

As we shall see shortly, actual measurements of galaxy shapes in practice give us an estimate of g rather than γ itself.

Relation to cosmology

Now that we have introduced our main WL observables, let us establish how we can relate them to the cosmological parameters we introduced in Section 2.1.5. From the the definition of the lensing potential (2.58) and its relationship with convergence (2.61), we can relate κ to the 2D-Laplacian of the gravitational potential:

κ(θ θ θ, χ) = 1 c 2 χ 0 f K (χ -χ ) f K (χ) f K (χ ) ∇ 2 Φ( f k (χ )θ θ θ, χ )dχ .
(2.65)

It is a reasonable assumption that d 2 Φ/dχ 2 would vanish when integrated along the line of sight, since negative and positive contributions would compensate each other, and we can thus replace the Laplacian in (2.65) with its 3D counterpart. This is, in turn, precisely the quantity that appears in the Poisson equation (2.28), yielding

κ(θ θ θ, χ) = 4πG c 2 χ 0 f K (χ -χ ) f K (χ ) f K (χ) a 2 (χ ) ρ(χ )δ( f K (χ )θ θ θ, χ )dχ .
(2.66)

If we use the matter EOS (2.39) and make the critical density (2.14) appear from the 4πG term, we get

κ(θ θ θ, χ) = 3H 2 0 Ω m 2c 2 χ 0 f K (χ -χ ) f K (χ ) f K (χ) δ( f K (χ )θ θ θ, χ ) a(χ ) dχ .
(2.67)

We can see from this expression that the convergence is a projection of the density along comoving coordinates, with a weighting that depends on the geometry of the Universe in between source and observer.

Up to now, we have focused on a single source at an arbitrary distance χ. Let us now consider a full WL survey, probing up to limiting distance χ lim . Let n(χ) denote the probabilty density function (PDF) of the galaxy sample across distances; n is more commonly referred to as the "n of z", directly related through n(z)dz = n(χ)dχ.

The mean convergence is then

κ(θ θ θ) = χ lim 0 κ(θ θ θ, χ)n(χ)dχ = 3H 2 0 Ω m 2c 2 χ lim 0 q(χ) f K (χ) δ( f K (χ)θ θ θ, χ) a(χ) dχ,
(2.68)

where q is the lens efficiency,

q(χ) := χ lim χ n(χ ) f K (χ -χ) f K (χ ) dχ .
(2.69)

Note that in this expression, our distribution of galaxies n does not depend on the direction on the sky. This no longer holds true in the vicinity of galaxy clusters, because of the proximity in between source galaxies [START_REF] Schneider | B-modes in cosmic shear from source redshift clustering[END_REF], or between them and the lenses [START_REF] Bernardeau | The effects of source clustering on weak lensing statistics[END_REF][START_REF] Hamana | Source-lens clustering effects on the skewness of the lensing convergence[END_REF].

Cosmic shear

In the previous section, we established convergence as a projection of density, and thus overall mass, along a line of sight. However, since the average density contrast is zero, so is the expected value of convergence (or shear, for that matter). If we are to retrieve cosmological information, we must thus turn to higher-order statistics of our observables' distributions. The first non-trivial ones are of course the second order statistics, on which we shall focus here, in their simplest form possible. We give a brief overview of some more advanced statistics that can be used to leverage WL measurements at the end of this section.

Let us then consider the convergence power spectrum, defined similarly to (2.35) in the 2 instead of 3D case:

κ(l l l)κ * (l l l ) := (2π) 2 1 {l l l=l l l } P κ (l),

(2.70)

where the power spectrum once again depends only on the modulus of the 2D wave vector, l := |l l l|, since like the density field δ, κ is statistically homogeneous and isotropic at large scales. Note that by working in Fourier space, we implicitly started using the important flat-sky approximation. Because convergence is measured in directions on the celestial sphere, it would be more accurate to compute the lensing power spectrum using spherical harmonics. [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF] give both a thorough derivation in this case, as well as a study of the impact of this approximation. By further making use of the Limber approximation [START_REF] Limber | The analysis of counts of the extragalactic nebulae in terms of a fluctuating density field[END_REF], that is, neglecting correlations along the line of sight, [START_REF] Kaiser | Weak gravitational lensing of distant galaxies[END_REF] showed that the convergence and density power spectra are related through

P κ (l) = 9H 4 0 Ω 2 m 4c 4
χ lim 0 q 2 (χ) a 2 (χ) P δ k = l f K (χ)
, χ dχ.

(2.71)

Once again, [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF] provide a study of the impact of the Limber approximation, and extensions thereof [START_REF] Loverde | Extended Limber approximation[END_REF], on cosmological inference from cosmic shear. They conclude that working with a flat-sky is sufficient for cosmic shear in current WL surveys, though future large-scale surveys will require the consideration of a full spherical sky and a second order Limber approximation. In the present work, we shall proceed with the simple expression we obtained in (2.71).

Note that the convergence and shear power spectra are actually equal. Indeed, when taking the Fourier transform of both the convergence and complex shear, their relation to the lensing potential in equations (2.61-2.63) yield

κ(l l l) = l 2 1 + l 2 2 2 ψ,
(2.72)

γ1 (l l l) = l 2 1 -l 2 2 2 ψ,
(2.73)

γ2 (l l l) = l 1 l 2 ψ, (2.74)
which can be combined into γ(l l l) = (l 1 + il 2 ) 2 l 2 κ(l l l) := e 2iβ κ(l l l),

(2.75)

where β is the polar angle of l l l, which in turn gives us P γ = P κ . Therefore, while it is possible to perform an "inversion" to obtain the convergence from shear measurements (for instance using Equations 2.72-2.74, as is done in the traditional method of [START_REF] Kaiser | Mapping the dark matter with weak gravitational lensing[END_REF], we can also work directly with the 2-point statistics of shear and still retrieve the cosmological information contained in (2.71).

Our shear measurements will ultimately come from individual galaxies, which can lead to several complications when working in Fourier space, for instance the handling of masked areas where no galaxy shapes were measured. It is therefore more convenient to work in direct space, and look at the 2PCF of the shear. Instead of working directly with the complex shear, it will prove convenient to reparametrize it. For any direction θ θ θ with polar angle ϕ, we define the tangential and cross-components, respectively, as (2.77) where Re and Im are the real and imaginary parts of their argument, respectively. We then have three possible 2-point correlators: γ t γ t , γ × γ × , and γ t γ × . In a parity-symmetric Universe, that is, one that remains unchanged by a mirror transformation, the latter vanishes, as γ t is unaffected by such a transformation while γ × sees its sign swapped. We can then finally introduce the two components of our shear 2PCF,

γ t := -Re γe -2iϕ , (2.76) γ × := -Im γe -2iϕ ,
ξ + (θ) := γ t γ t (θ) + γ × γ × (θ), (2.78) ξ -(θ) := γ t γ t (θ) -γ × γ × (θ).
(2.79) These are directly related to the convergence power spectrum through the Hankel transform,

ξ + (θ) = 1 2π +∞ 0 lJ 0 (lθ)P κ (l)dl,
(2.80)

ξ -(θ) = 1 2π +∞ 0 lJ 4 (lθ)P κ (l)dl, (2.81)
where J n is the n th -order Bessel function of the first kind,

J n (x) := ∞ m=0 (-1) m m!Γ(m + n + 1) x 2 2m+n , (2.82)
with Γ the Gamma-function. Equations (2.80-2.81) thus give us quantities that relate the measured shear with our cosmological models.

There remains one last step to connect these to real-life WL measurements, which give us the shapes of galaxies rather than the shear itself. As we shall discuss further in Section 2.3.7, there are a great many definitions of what exactly constitutes the shape of a galaxy; for now, let us consider the simple case where a galaxy is assumed to have elliptical isophotes with minor axis of length a, major axis of length b, and position angle ϕ. Let us define its intrinsic ellipticity as

int := a -b a + b e 2iϕ .
(2.83)

The application of a reduced shear g (of modulus less than one) leads to its observed ellipticity being [START_REF] Seitz | Steps towards nonlinear cluster inversion through gravitational distortions. III. Including a redshift distribution of the sources[END_REF])

= int + g 1 + g * .
(2.84)

Using these, Schneider et al. (2002a) proposed the following estimator of the 2PCF:

ξ± (θ) := (i, j)∈Π(θ) w i w j t,i t, j ± ×,i ×, j (i, j)∈Π(θ) w i w j , (2.85)
where the w i 's are weights given to each measured galaxy shape, resulting from an estimation of our uncertainty on the measurements, that arises from the steps we will detail in Section 2.3. Π(θ) is the set of all indices i, j such that the angular separation between galaxies i and j lies in a small bin around θ, and the tangential and cross-ellipticity components are derived the same way as their shear counterparts in (2.76, 2.77).

There are two important potential sources of bias we should mention at this point. First, while we have established the link between shear and cosmology in the last two subsections, the quantity that appears in (2.84) is not shear itself, but the reduced shear (2.64). Using one in lieu of the other, that is, approximating (2.84) by

≈ int + γ,
(2.86) can lead to significant biases in our estimation of the shear power spectrum. Corrections can reach the order of 10% of the power spectrum's amplitude at arcminute scales [START_REF] Krause | Weak lensing power spectra for precision cosmology-multiple-deflection, reduced shear, and lensing bias corrections[END_REF]Deshpande et al., in prep).

Second, when working with galaxy ellipticities from wide surveys, it is common to assume there is no preferred intrinsic orientation of galaxies, that is, for a large number of objects, int = 0.

(2.87) If this first-order assumption seems perfectly reasonable, dealing with second order quantities is trickier. From equations (2.85) and (2.86), one can see that in addition to the shear-shear correlation, terms of the form int i ( int j ) * and int i γ * j , often called "shape-shape" or II and "shape-shear" or GI, respectively, will make their appearance. These make up the problem of intrinsic alignment, which has recently proven to be a topic of vast interest in the WL community. Several approaches have been proposed to tackle this issue, for instance considering intrinsic alignment as an extra, "nuisance" parameter to be estimated alongside the cosmological parameters, or by using appropriate weights in the combination of shear quantities ("nulling"). See [START_REF] Troxel | The intrinsic alignment of galaxies and its impact on weak gravitational lensing in an era of precision cosmology[END_REF]; [START_REF] Joachimi | Galaxy alignments: An overview[END_REF] for recent reviews on this topic.

In the next subsection, we will turn our attention to the practical measurement of quantities such as the galaxy ellipticities used in (2.85). With this specific and simple example, we have established how such quantities can then be used for cosmological inference. However, we should emphasize once again that WL observations can be used for several other scientific endeavors 10 . Even with the estimation of cosmological parameters in mind, WL observables can be used in many ways that go beyond the simplest of cases we have chosen to use for illustration here. We shall now give a very brief overview of some of the most significant, and highlight, once again, that the main problem we aim to address in this thesis -that of the PSF estimationremains of similar relevance for every one of those other uses of WL data.

Using redshift information

In (2.69), all the redshift information is contained in the distribution of our galaxy sample, n(z), that we integrate up to the limiting distance of our survey. This effectively makes our study of cosmic shear a 2D one. It is of course tempting to try and extend that analysis to make (more) use of the radial distribution of galaxies, which in turn would allow us to probe the LSS at different times. While 2D cosmic shear is already good at probing the overall distribution of matter (i.e. a combination of the Ω m and σ 8 parameters), the addition of redshift information is particularly desirable if one wants to probe some other quantities. For instance, if one aims to use WL to constrain a time-varying Dark Energy EOS, as discussed at the end of Section 2.1.5, it is naturally crucial to include redshift information.

The simplest way to do so is to split the galaxies into redshift bins; this is called tomographic WL [START_REF] Hu | Power spectrum tomography with weak lensing[END_REF]. This leads to one lens efficiency q i per redshift bin, and to n zbins (n zbins -1)/2 convergence power spectra, where n zbins is the chosen number of redshift bins, but the overall approach remains, broadly speaking, fairly close to that we showed in the 2D case. Conversely, 3D lensing, first proposed by [START_REF] Heavens | 3D weak lensing[END_REF], actually makes full use of the per-galaxy redshift estimate. While it requires more involved changes than tomography, it can also greatly improve the yield of our WL data. For instance, when using it to constrain modified gravity 10 To name but one example, [START_REF] Mahdavi | A dark core in Abell 520[END_REF] used WL data to analyze the Abell 520 system and found what appeared to be a dark core, which could potentially be evidence against collisionless dark matter. See [START_REF] Okabe | Subaru weak lensing study of seven merging clusters: distributions of mass and baryons[END_REF]; [START_REF] Jee | A study of the dark core in A520 with the Hubble Space Telescope: The mystery deepens[END_REF]; [START_REF] Clowe | On dark peaks and missing mass: a weak-lensing mass reconstruction of the merging cluster system A520[END_REF]; [START_REF] Jee | Hubble Space Telescope/Advanced Camera for Surveys confirmation of the dark substructure in A520[END_REF]; [START_REF] Peel | Sparse reconstruction of the merging A520 cluster system[END_REF]; [START_REF] Price | Sparse bayesian mass-mapping with uncertainties: hypothesis testing of structure[END_REF] for further WL analysis of this object (the last two references find no significant detection of a dark core). models, Spurio [START_REF] Mancini | Testing (modified) gravity with 3D and tomographic cosmic shear[END_REF] recently showed that a 3D analysis of a Euclid-like survey will lead to a 20% decrease in errors compared to a tomographic approach.

Either of those approaches of course require an estimation of redshift for each object; in the WL context, where a very large number of galaxies are used, these are often obtained from photometric redshift (photo-z); we shall revisit this issue briefly in Section 2.3.

Derived second order functions

Beyond the standard shear 2PCF in (2.80-2.81), it can be useful to compute other, more advanced second order functions. For instance, by splitting the shear correlations into E-and B-modes (like is commonly done for CMB polarization), we would expect the latter to vanish, and it thus provides a strong tool to explore potential remaining systematics. This decomposition involves the choice of a filter function, several of which have been proposed in the context of WL: the top-hat [START_REF] Kaiser | Weak gravitational lensing of distant galaxies[END_REF], aperture mass [START_REF] Schneider | A new measure for cosmic shear[END_REF], optimized ring statistic [START_REF] Fu | A new cosmic shear function: optimized E-/B-mode decomposition on a finite interval[END_REF], Complete Orthogonal Sets of E-/B-mode Integrals (COSEBIs; [START_REF] Schneider | COSEBIs: Extracting the full E-/B-mode information from cosmic shear correlation functions[END_REF], and spin directional wavelets [START_REF] Leistedt | Wavelet reconstruction of E and B modes for CMB polarization and cosmic shear analyses[END_REF].

Higher-order statistics

As a first non-trivial statistic one can derive from shear measurements, the 2PCF is both a natural and reasonable choice. Nonetheless, our WL observations contain more information than can be probed with second order statistics; in particular, higher-order statistics can probe the non-Gaussian part of the gravitational lensing signal. Other statistics have been proposed, and in some cases successfully applied to real data: the WL bispectrum [START_REF] Cooray | Weak gravitational lensing bispectrum[END_REF], peak counts (the PhD thesis of Lin, 2016, provides a great entry point and recent overview of the field), Minkowski functionals [START_REF] Kratochvil | Probing cosmology with weak lensing Minkowski functionals[END_REF], and recently, deep learning-based approaches [START_REF] Peel | Distinguishing standard and modified gravity cosmologies with machine learning[END_REF][START_REF] Merten | On the dissection of degenerate cosmologies with machine learning[END_REF]. Not only can these beyond-second order approaches yield cosmological constraints that are competitive with those obtained from the 2PCF, the combination of both can often lead to higher constraining power than either approach would have (see, e.g., [START_REF] Martinet | KiDS-450: cosmological constraints from weak-lensing peak statistics-II: Inference from shear peaks using N-body simulations[END_REF].

Practical weak lensing

We have established WL, in the previous section, as a rich source of cosmological information, and how the relevant quantities can be computed using measurements of a high number of galaxy shapes.

We now turn to the issue of how these shapes can be obtained from real-life observations. We thus give a brief overview of the critical steps involved in a shape measurement pipeline, that is, how one goes from raw images from a given survey to a final shape catalog. Each of these steps can, if not properly handled, lead to biases in the shape measurements that would then have an impact on the science performed from the output catalogs. This section is largely based on my personal experience (see Appendix B), contributing to ShapePipe (Guinot et al., in prep), a shape measurement pipeline currently being developed for the Canada France Imaging Survey (CFIS) survey.

The very first observational detections of WL by the LSS occurred in 2000 and were made independently by four different groups [START_REF] Bacon | Detection of weak gravitational lensing by large-scale structure[END_REF][START_REF] Kaiser | Large-scale cosmic shear measurements[END_REF][START_REF] Van Waerbeke | Detection of correlated galaxy ellipticities on CFHT data: first evidence for gravitational lensing by large-scale structures[END_REF][START_REF] Wittman | Detection of weak gravitational lensing distortions of distant galaxies by cosmic dark matter at large scales[END_REF]. Since then, galaxy shape measurement for WL studies has been performed on many different datasets, culminating in several dedicated surveys. All these are listed in Table 2.2. At the time of this writing, the last11 major survey to have released WL data products is the HSC survey, which provides two excellent references to get more details about the topics discussed in this section: [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF] give a very detailed rundown of the main steps of their overall data processing that includes, but is not limited to, shape measurement, while [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF] go into more detail and provide validation for the steps central to building the final shape catalog. [START_REF] Gong | Cosmology from the Chinese Space Station Optical Survey (CSS-OS)[END_REF] Table 2.2: List of past, current and upcoming cosmological WL studies. When applicable, the references to both the overall survey and the actual galaxy shape measurement pipeline and/or catalog are given. For the latter, the reference given is the most up-to-date 12 at the time of this writing. The PSF model used is indicated in the last column; these are further discussed in Section 2.4.3. Space telescopes are written in bold font.

CSS-OS

CSS-OS

a An earlier processing [START_REF] Jarvis | Weak-lensing results from the 75 square degree Cerro Tololo Inter-American Observatory survey[END_REF] used an approach, close to that denoted "shape interpolation" of other early studies, based on [START_REF] Bernstein | Shapes and shears, stars and smears: optimal measurements for weak lensing[END_REF]. b [START_REF] Rhodes | Measurement of cosmic shear with the Space Telescope Imaging Spectrograph[END_REF] perform an independent (and better-known) analysis, complete with a tailored PSF model, wherein they use high Signal-to-Noise Ratio (SNR) stars from dense stellar fields as baseline PSF, similar to the common "shape interpolation" approach of that era, on top of which they model variations with SNR and y-axis position.

c [START_REF] Casertano | Cosmic gravitational shear from the Hubble Space Telescope Medium Deep Survey[END_REF] conducted an independent WL study of Wide Field Planetary Camera 2 (WFPC2) data; their handling of the PSF was to be described in a companion paper that remained unpublished (R.E. Griffiths, private communication). d [START_REF] Heymans | Cosmological weak lensing with the HST GEMS survey[END_REF] provide an earlier analysis, including a detailed study of the PSF; they use a semi-time-dependent "shape interpolation" approach (that is, they split their stellar sample into 3 groups of observations taken less than 10 days apart).

e The original WL catalog [START_REF] Leauthaud | Weak gravitational lensing with COSMOS: galaxy selection and shape measurements[END_REF] was built using TinyTim [START_REF] Rhodes | The stability of the point-spread function of the Advanced Camera for Surveys on the Hubble Space Telescope and implications for weak gravitational lensing[END_REF].

f In this category are post-CFHT Lensing Survey (CFHTLenS) surveys where cosmological WL analysis are carried out, though they are typically not considered as "Stage III" WL surveys per se.

Image "preprocessing"

Since in this section, we are dealing with going from raw images to WL-relevant quantities, defining a clear line between "pre-" and "main" processing is not an easy task. Nonetheless, there are several very low-level (in the sense that they occur on the rawest, closest to telecope-outputted data) steps that are critical to successful lensing measurements, and can directly impact them (as illustrated, for instance, by [START_REF] Hoekstra | Weak lensing analysis of CL 1358+62 using Hubble Space Telescope observations[END_REF] the case of camera distortions). As an example, for Canada-France-Hawaii Telescope (CFHT) data, many of these early steps are handled by the widely used Elixir pipeline [START_REF] Magnier | The Elixir system: Data characterization and calibration at the Canada-France-Hawaii Telescope[END_REF]. See also [START_REF] Erben | CFHTLenS: the Canada-France-Hawaii Telescope Lensing Survey-imaging data and catalogue products[END_REF] for a detailed account of further steps taken (mostly within the THELI pipeline) on top of Elixir-processed images for the CFHTLenS survey.

It is naturally of crucial importance, not just for WL, but for any astronomical endeavor, to know the correspondence between an image and the part of the sky it features. Even within each image, we will need a precise mapping from pixels to real-world positions, which tends to be highly non-linear because of both the curvature of the sky and instrument-induced distortions. Astrometry, and especially establishing a very accurate World Coordinate System [START_REF] Greisen | Representations of world coordinates in FITS[END_REF][START_REF] Calabretta | Representations of celestial coordinates in FITS[END_REF], are of course especially crucial for WL, where the position of galaxies will ultimately be central to the computation of shear statistics, as shown in Section 2.2.4.

Several effects related to the instrument, and especially to the Charge-Coupled Devices (CCDs) typically used in lensing surveys, are also often corrected for before moving on to the steps presented in the following subsections. These include various steps of detrending (flat-fielding, de-biasing, etc.) and possibly handling of other effects such as crosstalk or saturation. Estimation and subtraction of the background can also sometimes be performed at these early stages, though it is now well-established [START_REF] Martinet | Euclid preparation: IV. impact of undetected galaxies on weak-lensing shear measurements[END_REF] that this issue should be approached with extreme care as it can have a substantial impact on shear measurements.

Cosmic rays and satellite trails need to be addressed, as they would otherwise cause severe biases in a lensing analysis (for instance if falsely identified as extremely elongated galaxies). If single exposure images are to be used for the analysis, they should thus be identified and removed (masked) from the analysis (see, e.g., [START_REF] Desai | Detection and removal of artifacts in astronomical images[END_REF], for an approach applied to Dark Energy Survey -DES -data).

An alternative way to deal with cosmic rays and satellite trails is the use of stacking, that is, the combination of several single exposures that feature the same part of the sky into a single image. Stacking comes with several other appealing consequences: as it allows to go deeper, it increases the number of detected objects; it reduces noise levels, which increases the quality of galaxy images and should thus, in principle, help with the shape measurement process; it can fill in the gaps in between the CCDs; it can help deal with undersampled images [START_REF] Lauer | Combining undersampled dithered images[END_REF][START_REF] Fruchter | Drizzle: A method for the linear reconstruction of undersampled images[END_REF][START_REF] Rowe | Optimal linear image combination[END_REF]. Stacking however has one major drawback, especially in the case of shape measurement, linked to the core of this thesis: the handling of the PSF. We have already mentioned that it is of the utmost importance for WL -a point that we shall establish formally in Section 2.4, though it is natural to get a sense of why this would be the case, since the PSF can and does alter the very shapes we aim to measure. A single galaxy is affected by a different PSF on each single exposure it appears on, because of changing atmospheric contributions and/or because it falls at a different position within the focal plane each time. It then raises the question of how to combine the PSF models from each exposure into a single, final PSF to use in order to correct the shape measured on the stacked galaxy image. One cannot simply build a "stacked" PSF model by applying a standard PSF modelling approach directly on the stacked images, since each time a different set of pointings are combined, the resulting PSF model is different. This is illustrated in Figure 2.6 with data from CFIS: the PSF model across the central "tile", that combines stacks with different sets of available single exposures, has a great many discontinuities. The PSF model therefore needs to be fitted on single exposure images. There are then three main approaches to make the most use of the multiple available exposures for shape measurement. The first one is simply not to use stacked images for shape measurement, though detection (which we shall return to in Section 2.3.3) should still be performed on these. The multiple images of the galaxy can still be leveraged to get the best possible shape measurement by simultaneously fitting each single-exposure galaxy/PSF pair of the same object. This typically implies the need for a model-fitting shape measurement method (see Section 2.3.7), and is for instance currently the chosen approach in the KiDS survey [START_REF] Kuijken | Gravitational lensing analysis of the Kilo-Degree Survey[END_REF]. If the same object is observed through several filters, shape measurement can also be improved in a similar fashion by using each of these images, as is done for instance in the Dark Energy Survey (DES) survey [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF].

Another approach is to perform the shape measurement on the stacked image, which requires a careful combination of the single-exposure PSF models on a per-object basis. This can, in turn, be done in two ways. The first one, that seems to have fallen somewhat out of favor in the WL community in recent years, is to apply extra, well-chosen convolutions to each image so that they are all effectively affected by the same PSF, often chosen to be circular. This was, for instance, the chosen approach of [START_REF] Huff | Seeing in the dark-I. Multi-epoch alchemy[END_REF] in their WL analysis of the Sloan Digital Sky Survey (SDSS) data. Lastly, the individual PSF models can be evaluated for each object, then combined into a single PSF model, to be used with the stacked galaxy image, within any standard shape measurement approach. This requires the PSF combination to be done in the exact same fashion as that of the galaxy stacking; in particular, care should be given to the weights allocated to each single PSF. Historically, this approach has been used to combine only the PSF model quantities that were required for the correction, typically some measures of the shape of the PSF. This was fairly common in early studies (first two "eras" of our Table 2.2), and was also often used for space-based WL measurements with HST (e.g. by [START_REF] Schrabback | Cosmic shear analysis of archival HST/ACS data-I. Comparison of early ACS pure parallel data to the HST/GEMS survey[END_REF]. More recently, the full PSF models, sampled on small images ("postage stamps") are combined to obtain an actual stacked PSF with as many pixels, which can then be used with any shape measurement approach. This is currently done by [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF] for the HSC survey.

Lastly, several detector effects can be taken into account at this stage. Their impact on shape measurement are somewhat similar to those of the PSF, though they are typically non-convolutional and can be fluxdependent. It is therefore impossible to simply consider them as extra effects that contribute to the final PSF and correct for them in a single step. In this work, we will always assume they have been modelled and corrected for prior to the PSF modelling stage.

Chief among these detector effects is surely the Charge Transfer Inefficiency (CTI) phenomenon that affects all CCD devices, but can become especially significant for space-based telescopes as the harsh conditions of their environment tend to lead to increasing levels of CTI throughout the lifespan of the instrument. [START_REF] Massey | An improved model of charge transfer inefficiency and correction algorithm for the Hubble Space Telescope[END_REF] proposed a modelling approach and successfully applied it to HST; the continuation of these efforts is currently ongoing specifically for application to Euclid [START_REF] Israel | How well can charge transfer inefficiency be corrected? A parameter sensitivity study for iterative correction[END_REF][START_REF] Israel | Erratum: How well can charge transfer inefficiency be corrected? A parameter sensitivity study for iterative correction[END_REF]Nightingale et al., in prep).

Second is the Brighter-Fatter effect (BFE), wherein the size of brighter objects tends to be larger. This is, of course, particularly relevant to WL and especially PSF modelling, since the latter is typically performed using bright stars. [START_REF] Coulton | Exploring the brighter-fatter effect with the Hyper Suprime-Cam[END_REF] recently studied and proposed a scheme to correct for this effect, with application to HSC data.

Lastly, [START_REF] Boone | A binary offset effect in CCD readout and its impact on astronomical data[END_REF] recently discovered an effect on CCD readout electronics, where a binary offset, that depends on the number of 1s in the binary representation of a "driver" pixel, occurs for the few pixels read out immediately after. It is likely one that should be considered and carefully dealt with for WL, when present. Note that several of the steps we mentioned in this subsection can actually be improved once the others have been performed; in fact, this circularity extends to the PSF modelling step, as we shall briefly discuss in Section 2.3.5. In practice, an iterative approach can thus prove beneficial, where the corrections or calibrations discussed here are repeated on data that has already been "cleaned" from all other effects.

Masking

The areas covered by WL surveys are naturally becoming larger and larger, which necessitates an increasing degree of automation in the data processing pipelines. In particular, objects that appear in science exposures and cannot be used for WL analysis need to be identified and "masked" (i.e., removed from all further analysis). This masking step itself requires automation, as it has become impossible to expect human eyes to identify and demarcate all undesirable objects.

Among everything that should be masked for a successful WL analysis, the three most significant are bad pixels, saturated stars, and nearby galaxies (see Appendix B for an anecdotal illustration of the latter's importance).

Object detection

Once again, the sheer size of WL surveys calls for an automated detection of both stars and galaxies. This is also typically the stage at which "postage stamps", small images centered on a particular object, are extracted and used in further analysis. This is most often performed, for WL as it is for many other types of studies on wide optical astronomical data, with [START_REF] Bertin | SExtractor: Software for source extraction[END_REF]'s celebrated SExtractor software. Beyond identifying individual objects and extracting postage stamps, SExtractor performs many other tasks such as measuring several quantities, on those objects, that will prove useful to later steps of the shape measurement pipeline (e.g. noise levels, individual SNRs, object sizes).

(De)blending

Another crucial information provided by SExtractor is the identification of blended objects, that is, cases where two or more distinct objects are close enough, when projected on the sky, to overlap and appear in one another's postage stamp. SExtractor identifies such cases, and offers tailored masks that identify which pixels are affected by the contaminating additional object(s). These can in turn either be removed from the samples entirely, or treated as stamps with several masked out pixels (which can, of course, strongly hinder the shape measurement process).

While this is an extremely powerful first order tool to deal with blends, a more advanced treatment of this issue will likely be needed for Stage IV WL surveys, especially for the ground-based LSST. As our surveys go deeper, blending naturally occurs more frequently, and experience gained on recent surveys clearly identify this issue as one of the most major for WL goals: [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF] estimate that 58% of objects identified in the HSC wide survey were recognized blends! Several advanced methods to deal with the identification and separation of blended objects have recently been proposed [START_REF] Joseph | Multi-band morpho-spectral component analysis deblending tool (MuSCADeT): Deblending colourful objects[END_REF][START_REF] Melchior | Scarlet: Source separation in multi-band images by constrained matrix factorization[END_REF][START_REF] Boucaud | Photometry of high-redshift blended galaxies using deep learning[END_REF]. These works illustrate that the use of colour information makes this complicated issue considerably easier to tackle. While the Euclid VIS observes in only one, very wide band, its spaceborne nature means it is far better at resolving objects. The (de)blending issue in WL therefore makes for great potential synergy between ground-and space-based future missions, especially between LSST and Euclid [START_REF] Rhodes | Scientific synergy between LSST and Euclid[END_REF][START_REF] Schuhmann | Galaxy shape measurement synergies between LSST and Euclid[END_REF].

Star-galaxy separation

While we have already addressed several artefacts and other potential sources of false detections that could occur during the process of Section 2.3.3, there still remains an important distinction to be made between those objects that remain: galaxies and stars. The former will of course be used to measure shapes and, eventually, cosmic shear or other cosmologically-relevant quantities. Stars tend to be both more circular than galaxies, and much closer (most within the Milky Way). It is therefore important not to misidentify stars as galaxies and treat their measured shapes as if they carried some sort of cosmological lensing information. Even among those objects identified as galaxies, it might be preferable to remove some from the sample that will be used for shape measurement. A good illustration of this is given by the DES Year 1 shape catalog [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF], where two different shape measurements methods required selecting two different galaxy catalogs.

Conversely, we want clean samples of stars to fit our PSF models on; leftover galaxies within those sample would bias our PSF model. In fact, given the importance of the latter in WL studies, it is common to perform a further, more conservative selection of "PSF stars" for this purpose specifically, than that done for others, such as photometric measurement. For instance, the DES PSF star selection made by [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF] is different from what has been done for photometry [START_REF] Drlica-Wagner | Dark Energy Survey Year 1 results: the photometric data set for cosmology[END_REF]. The most common approach is to make use of the size-magnitude diagram (or diagrams made from proxies of those two quantities). While galaxies come in a variety of sizes, all stars (or rather, all those unaffected by the BFE, unresolved, and unsaturated) should be of roughly the same size, namely that of the PSF. This defines the stellar locus, a fairly straight line within the size-magnitude diagram, the identification of which amounts to a star selection. An example is shown, from our own processing of the CFIS data, in Figure 2.7. For KiDS, [START_REF] Kuijken | Gravitational lensing analysis of the Kilo-Degree Survey[END_REF] refined this approach by also using the fourth-order moment measured on the object's postage stamps (see Section 2.3.7 for a definition of lower-order moments).

Another approach is the use of external star catalogs from dedicated surveys. This comes with strong confidence on the (close) lack of contamination by non-star objects, and is being made increasingly more seemly by current successive Gaia data releases [START_REF] Brown | Gaia Data Release 2-Summary of the contents and survey properties[END_REF].

This classification problem could be approached by advanced methods; a neural network is included in SExtractor (if ran in conjunction with the companion, PSF modelling software PSFEx of Bertin, 2011, which we shall return to in Section 2.4.3), though it is generally not used for PSF star selection (see the different DES star catalogs [START_REF] Drlica-Wagner | Dark Energy Survey Year 1 results: the photometric data set for cosmology[END_REF]Zuntz et al., 2018, for illustration).

At the end of Section 2.3.1, we mentioned how the steps described there could benefit from an iterative, repeated processing. The same is very true for star-galaxy separation, as once a PSF model has been established, objects that appear very different from it are unlikely to be stars. Historically (e.g. in several studies of the "Early applications" era of Table 2.2), this notion was often used by performing shape "clipping", that is, by removing from the star sample all objects whose size or ellipticity differed from that of the PSF model, then refitting the model on surviving stars. Nowadays, where full-pixel PSF models are more common, bad objects can be iteratively removed from the star sample by goodness-of-fit tests, typically through a cut-off in χ 2 . Such an approach is, for instance, natively handled by PSFEx.

PSF modelling

We have now established how a clean star sample has been selected from raw images. Section 2.3 gives an overview of the critical steps in a shape measurement pipeline. The PSF modelling process would typically occur at this stage, but given the nature of this work, it requires a more in-depth treatment. We thus postpone these considerations and refer the reader to Section 2.4 and subsequent chapters.

Galaxy shape measurement

Assuming we obtained an appropriate PSF model for each of the galaxies we selected in Section 2.3.5, we can finally turn to the practical measurement of shapes. This implies addressing two main issues. First, we need a definition of what exactly constitutes the shape of a galaxy. Second, we need to find a way to obtain this measurement while correcting for the influence of the PSF.

Defining ellipticities

In (2.83), we defined the ellipticity of a galaxy using the semi minor-and major-axes of its supposed elliptical isophotes. We then connected this quantity to the action of reduced shear through (2.84). Of course, real-life galaxies have complex brightness profiles, whether it is because of different components (e.g. a bulge and a disk) of highly different shapes, of intricate spiral arms, or simply, in the case of irregular galaxies, because they are in no way ellipsoidal. They are thus nowhere close to having elliptical isophotes, and the intuitive and geometric definition of (2.83) is of no practical use.

Let us introduce a definition of "ellipticity" that is computable on any brightness profile, I(x 1 , x 2 ), where x 1 and x 2 are arbitrary orthogonal coordinates (in practice, they will typically be chosen to move along the xand y-axes corresponding to the pixel grid on our discrete images). Let Q i j denote the (centered) quadrupole moments of our image I. Q is defined as

Q i j := R 2 I(x 1 , x 2 )(x i -x c i )(x j -x c j )d(x 1 , x 2 ) Q 0 ,
(2.88) for i, j ∈ {1, 2}, where

Q 0 := R 2 I(x 1 , x 2 )d(x 1 , x 2 )
(2.89) and the two

x c i := R 2 I(x 1 , x 2 )x i d(x 1 , x 2 ) Q 0 (2.90)
are called the image centroid. Note a strictly equivalent definition sometimes found in the litterature uses

µ i j := R 2 I(x 1 , x 2 )(x 1 -x c 1 ) i (x 2 -x c 2 ) j d(x 1 , x 2 ),
(2.91) which directly leads to

Q 0 = µ 00 ,
(2.92)

µ 10 = µ 01 = 0,
(2.93)

Q 11 = µ 20 /µ 00 , Q 12 = Q 21 = µ 11 /µ 00 , Q 22 = µ 02 /µ 00 .
(2.94)

Where, by definition of the centroid, the first order centered moments (µ 01 , µ 10 ) vanish. This notation has the advantage of illustrating how characterizing the ellipticity amounts to the knowledge of 6 individual quantities: either the 6 moments of order up to 2 or, equivalently, (a specific measure of) its flux, its two centroid coordinates, and three second order moments.

We can now define the ellipticity of our image I as

:= Q 11 -Q 22 + 2iQ 12 Q 11 + Q 22 + 2 Q 11 Q 22 -Q 2 12 .
(2.95)

This definition of ellipticity is a generalization of (2.83), since they coincide in the particular case of objects with elliptical isophotes. The action of a reduced shear (2.84) also holds true regardless of the initial image's profile I (up to its quadrupole moments being defined).

Another definition commonly found (perhaps even more so than that of Equation 2.95) in the lensing literature is

e := Q 11 -Q 22 + 2iQ 12 Q 11 + Q 22 .
(2.96)

The two are directly related through [START_REF] Bartelmann | Weak gravitational lensing[END_REF])

= e 1 + 1 -|e| 2 , e = 2 1 + | | 2 ,
(2.97) and analogous to (2.84), the action of a reduced shear g on an object with intrinsic ellipticity e int is e = e int -2g + g 2 e * 1 + |g| 2 -2Re(ge * ) .

(2.98)

The two notations can therefore be used fairly interchangeably, as long as one remains self-coherent (i.e. avoids mixing-and-matching of quantities computed with different definitions).

Another useful quantity is a measure of the size of an object, defined from its quadrupole moments Q i j , as

R 2 := Q 11 + Q 22 .
(2.99)

In the case of an object that follows a parametric profile, this quantity is directly related to the size parameters.

For instance, for a 2D Gaussian profile

I(x 1 , x 2 ) := A exp - (x 1 + x 2 ) 2 2σ 2 ,
(2.100)

we have R 2 = 2σ 2 . Much like equations (2.95-2.96) gave us ellipticity definitions applicable on any arbitrary profile, R 2 is a measure of size that can (in principle) be computed on any object. Throughout this thesis, when referring to stars or PSFs, the term "shape" will mean the set of both ellipticity e and size R 2 of the object.

Before we can use these definitions to measure ellipticities, two outstanding issues remain to be addressed.

First, images will be discretely sampled on a finite set of pixels, P. Second, noise will be present in our images.

Dealing with the discrete sampling may seem straightforward enough at first: we only have to replace the integrals in the definition(s) of our image moments with a discrete sum over the set of available pixels P. For instance, our definition of µ i j (2.91) would then become

µ i j := (x 1 ,x 2 )∈P I(x 1 , x 2 )(x 1 -x c 1 ) i (x 2 -x c 2 ) j .
(2.101)

We shall henceforth use the same notations Q i j , µ i j , and x c i to refer to either the continuous or discrete versions of these quantities.

In practice, our measurements will be made from postage stamps centered on the objects of interest (see Section 2.3.3). This means the set P is finite, which is not undesirable, as the pixel intensity actually emanating from objects of interest in a WL analysis (distant galaxies and unresolved stars) is likely to go below noise level after a small number of pixels, and it limits the number of other objects whose own profile impacts the pixel values. However, the quadrupole moments (2.88) are quantities of circular symmetry, while our postage stamps are square. This leads to truncation effects that can be quite significant when measuring ellipticities from (discrete) quadrupole moments on a postage stamp, especially in light of the fact that by construction, the first ellipticity component will likely correspond to elongation along the x and y axes of our stamps, while the second to those in the diagonal directions, i.e. where the truncation occurs the closest and farthest, respectively. Second, quadrupole moments are notoriously sensitive to noise. It is easy see why by looking at their definition (2.88): the furthest away from the center, the stronger the influence a single pixel will carry (because of the term in

x 2 1 , x 1 x 2 , or x 2 2
), yet the more its value will be driven by noise. Direct measurements of ellipticities from quadrupole moments are thus strongly noise-dominated in practical applications.

Both of these considerations are alleviated by the addition of a window function, similar to how we solved the problem of the power spectrum normalization in Equation 2.1.5. Let W denote such a function; we use the same notations to define weighted quadrupole moments and related quantities, for instance

µ i j := R 2 I(x 1 , x 2 )W(x 1 , x 2 )(x 1 -x c 1 ) i (x 2 -x c 2 ) j d(x 1 , x 2 ).
(2.102)

The addition of this window function naturally biases our estimation of the ellipticity -we shall return to this issue in Section 2.3.8 and Section 2.4.1, as it arises in the case of galaxies and PSFs, respectively. Moreover, it raises the question of the choice of W. It is typically chosen to be a 2D Gaussian centered on the object's centroid, which still leaves the question of its size to be addressed. Historically, this size would often be fixed a priori, and chosen to be the same for measurements on both galaxies and the stars used to model the PSF. This eventually proved to cause issues, especially as WL studies started being carried out with space instruments, where the moments measured from the (mostly optical) PSF are highly dependent on the chosen size for the window function [START_REF] Hoekstra | Weak lensing analysis of CL 1358+62 using Hubble Space Telescope observations[END_REF]. More recently, [START_REF] Hirata | Shear calibration biases in weak-lensing surveys[END_REF]; [START_REF] Mandelbaum | Systematic errors in weak lensing: application to SDSS galaxy-galaxy weak lensing[END_REF] suggested matching the size of the window function to that of the object being measured -we shall refer to this approach as Hirata-Seljak-Mandelbaum (HSM), and use it for all direct (that is, with no PSF correction) shape measurements derived from quadrupole moments for the rest of this thesis. Let us note that, as proposed by [START_REF] Melchior | Weak gravitational lensing with DEIMOS[END_REF]; [START_REF] Viola | Biases in, and corrections to, KSB shear measurements[END_REF], a natural extension is to make the window function match the object not only in size, but also in ellipticity, by iteratively shearing it.

"Shape measurement," or, how to correct for the PSF

The effect of the PSF is that of a convolution, i.e. if an object had an initial (in image space, that is, possibly already gravitationally sheared) brightness profile I, and was affected by a PSF H, the observed image would be

Y = I * H, (2.103)
where * is the convolution product. Removing the effect of the PSF therefore amounts to the task of deconvolution; a very well-studied topic in image processing (see, e.g., [START_REF] Starck | Astronomical image and data analysis[END_REF]. However, the needs that come with a WL-centric analysis make it impossible to directly apply this plethora of tried-and-tested deconvolution tools, as they come with no guarantee that the shape of objects, as we just defined them, remains unchanged through the process. This led to new approaches being developed, specifically with lensing in mind, as early as the mid-1990s. Broadly speaking, these shape measurement methods (which should be understood as including the removal of PSF effects, rather than just measuring the shape of an object taken on its own, as can be done using the weighted moments approach) fall into two categories.

Moments-based methods make use of the quadrupole moments, as defined in (2.88), of both the observed galaxy and the corresponding PSF, and correct for the latter directly in moments space. The classical example of such an approach is the famous Kaiser-Squires-Broadhurst (KSB), first proposed by [START_REF] Kaiser | A method for weak lensing observations[END_REF]. Throughout the years, several variants and improvements of KSB were proposed, for instance by [START_REF] Luppino | Detection of weak lensing by a cluster of galaxies at z=0.83[END_REF]; [START_REF] Hoekstra | Weak lensing analysis of CL 1358+62 using Hubble Space Telescope observations[END_REF]; [START_REF] Kaiser | A new shear estimator for weak-lensing observations[END_REF]; [START_REF] Viola | Biases in, and corrections to, KSB shear measurements[END_REF], and used on most of the early cosmic shear studies; see Table 2.2, where all entries where the PSF is modelled through "shape interpolation" used moments-based shape measurement approaches.

Model-fitting methods, first proposed as early as the end of last century by [START_REF] Kuijken | Weak weak lensing: correcting weak shear measurements accurately for PSF anisotropy[END_REF], makes use of the full PSF image instead of just its measured moments. An analytical profile for the galaxy is chosen, for instance a S érsic profile (S érsic, 1963). The parameters of this profile (plus those used in an extra shearing process if the profile is circular) are then fitted by convolving it with the PSF, then sampling it at the same pixel scale as the observations and comparing them. Because of this process, model-fitting methods are also often referred to as forward-fitting. This class of approaches had come to become the preferred one up to very recently, and has been used on several recent surveys in the following incarnations: LensFit [START_REF] Miller | Bayesian galaxy shape measurement for weak lensing surveys-III. Application to the Canada-France-Hawaii Telescope Lensing Survey[END_REF] in CFHTLenS and KiDS [START_REF] Kuijken | Gravitational lensing analysis of the Kilo-Degree Survey[END_REF], im3shape [START_REF] Zuntz | im3shape: a maximum likelihood galaxy shear measurement code for cosmic gravitational lensing[END_REF] and ngmix [START_REF] Sheldon | NGMIX: Gaussian mixture models for 2D images[END_REF] in DES [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF].

Both approaches come with their own advantages and pitfalls. Moments-based methods are typically less computationally demanding, as model-fitting often requires iteratively solving an inverse problem (see Section 3.1.1 for an introduction). As we already discussed above, the former come with the issue of having to select a window function, therefore introducing bias; the latter, with the need to select a model for the galaxies, which in turn introduces model bias (as real-world galaxies do not quite follow simple analytical profiles). Those two sources of bias have long been known to be very similar in the lensing community; with the correct formalism, one can in fact show they are mathematically identical, as done by [START_REF] Simon | Weak-lensing shear estimates with general adaptive moments, and studies of bias by pixellation, PSF distortions, and noise[END_REF].

A lot of effort has been made by the lensing community to compare different shape measurement methods, originally in the hopes of determining the best-suited, or at least understanding their differences. To this end, and to investigate other aspects of practical WL measurements, a series of challenges were organized, starting with the Shear TEsting Program [START_REF] Heymans | The Shear Testing Programme-I. Weak lensing analysis of simulated ground-based observations[END_REF][START_REF] Massey | The Shear Testing Programme 2: Factors affecting high-precision weak-lensing analyses[END_REF], followed up by the GRavitational lEnsing Accuracy Testing (GREAT) series, each of increasing complexity: GREAT08 [START_REF] Bridle | Handbook for the GREAT08 challenge: An image analysis competition for cosmological lensing[END_REF][START_REF] Bridle | Results of the GREAT08 challenge: An image analysis competition for cosmological lensing[END_REF], GREAT10 [START_REF] Kitching | Gravitational lensing accuracy testing 2010 (GREAT10) challenge handbook[END_REF][START_REF] Kitching | Image analysis for cosmology: results from the GREAT10 galaxy challenge[END_REF], which also contained a "Star Challenge" to compare PSF interpolation methods [START_REF] Kitching | Image analysis for cosmology: results from the GREAT10 star challenge[END_REF], and the latest to date, GREAT3 [START_REF] Mandelbaum | The third gravitational lensing accuracy testing (GREAT3) challenge handbook[END_REF][START_REF] Mandelbaum | GREAT3 results-I. Systematic errors in shear estimation and the impact of real galaxy morphology[END_REF]. This quest for the best per-object estimate of shape has, very recently (and in part thanks to the experience gained from these challenges), been replaced by a new paradigm [START_REF] Mandelbaum | Weak lensing for precision cosmology[END_REF]: the outputs of the shape measurement method itself is of little import, as long as the actual shear estimates we will derive from it (typically through some sort of averaging, e.g. in a 2PCF) are viable. In other words, rather than having an accurate shape measurement, we would rather have one that we can properly calibrate.

Before turning to how this calibration is carried out in practice in the next subsection, it is worth mentioning two more shape measurement approaches. Neither really fits into either the moments-based or the model-fitting categories. Moreover, rather than attempting to measure the shapes of individual objects, then estimate the contribution of gravitational lensing-induced shear from these, they instead directly attempt to measure the latter, in turn bypassing many of the issues we have presented in this subsection. The first is the Bayesian Fourier Domain (BFD) approach of [START_REF] Bernstein | Bayesian lensing shear measurement[END_REF] (see also Bernstein et al., 2016, for extensions). The second relies on machine learning algorithms trained on simulations; two different approaches have been proposed by [START_REF] Springer | Weak lensing shear estimation beyond the shape-noise limit: a machine learning approach[END_REF] and [START_REF] Tewes | Weak-lensing shear measurement with machine learning-Teaching artificial neural networks about feature noise[END_REF]. The latter and BFD are both planned to be used, along with more classical methods of the two classes described above, within Euclid.

Calibration

For an inferred shear ĝ = (ĝ 1 , ĝ2 ), let us extend the bias resulting from all the steps we have outlined in the present section to first order, (2.104) where i ∈ {1, 2}, g i is the true shear component, and m i and c i are the multiplicative and additive biases, respectively. The aim of the calibration step is to both evaluate and correct for these terms. The bias incurred on a specific galaxy depends on many of its properties, so it is important to estimate m and c as functions of these properties, rather than just single constants across the whole catalog. The dependency on the size of galaxies is the most obvious of these, so it has been common in calibration schemes to estimate different m and c values per object size bin. The requirements on future surveys will likely require a calibration scheme that varies with a great many parameters. [START_REF] Pujol | Shear measurement bias: dependencies on methods, simulation parameters and measured parameters[END_REF] carried out an in-depth study of several of these. See also [START_REF] Hoekstra | The Canadian Cluster Comparison Project: detailed study of systematics and updated weak lensing masses[END_REF][START_REF] Hoekstra | A study of the sensitivity of shape measurements to the input parameters of weak-lensing image simulations[END_REF]; [START_REF] Martinet | Euclid preparation: IV. impact of undetected galaxies on weak-lensing shear measurements[END_REF], where the authors explore many sources of bias (especially, in the latest of the series, that of undetected galaxies).

ĝi ≈ (1 + m i )g i + c i ,
In practice, until the very recent proposal for an alternative approach, the estimation of m, c was carried out using image simulations. These are made to be as realistic, and include as many real-world effects, as possible. The entire shape measurement pipeline is then ran on those simulations, and since we have access to the inputted shear values, we can actually compute the bias parameters from (2.104). When building those simulations, an invaluable resource is the freely available GalSim13 software [START_REF] Rowe | GalSim: The modular galaxy image simulation toolkit[END_REF], the original development of which started as a byproduct of the creation of the GREAT3 dataset (though it has since then far outgrown this initial purpose). The latest practical calibration of WL measurements through simulations was carried out by [START_REF] Mandelbaum | Weak lensing shear calibration with simulations of the HSC survey[END_REF] for the HSC survey.

Calibration through simulations comes with two major caveats. The first one is the computational cost associated with generating enough simulations to achieve sufficiently accurate calibrations; [START_REF] Pujol | A highly precise shear bias estimator independent of the measured shape noise[END_REF] recently proposed an approach to drastically reduce that number. The second is that the ultimate calibration scheme we get from simulations will only ever be as good as the simulations themselves, and it is of course hard to gauge exactly how realistic a particular simulation is. There are many specific points that could cause concern in this area; a good example is the profiles used to simulate the galaxies. It is well-known that analytical profiles are far too simplistic to accurately describe the intensity profile of real-life galaxies. Worse, if we use modelfitting methods, we would end up using the same (or very similar) profiles both to generate and measure the shapes of galaxies, therefore entirely missing the model bias that would definitely occur in applications to real data. A way around this issue is to use images of real galaxies, taken with an instrument with higher resolution, and reprocess them (including the application of the shear to be measured) so they match what would be observed by the survey at hand. An example is shown in Figure 2.8, where I have taken a galaxy observed with HST's Advanced Camera for Surveys (ACS), and processed it so it appears as it would if observed with Euclid's VIS instrument. While we have no information on the intrinsic shape of the galaxy, we can still use many of them to infer shear and perform calibration. While this approach frees us from the lack of realism introduced by using analytical galaxy profiles, it comes with its own limitation, namely the number of real galaxies observed, much lower than that we aim to observe with future surveys. This can (and should) be somewhat alleviated by using several different "realizations" of the same real object, including by rotating the original profile (which should be done regardless, to remove the impact of intrinsic galaxy shapes). Another promising and far more flexible option has recently been proposed by [START_REF] Ravanbakhsh | Enabling dark energy science with deep generative models of galaxy images[END_REF], who use generative networks trained on real data to create any arbitrary number of galaxy profiles that are indistinguishable from those we observed.

COSMOS galaxy

"Euclidized" galaxy As we hinted at at the beginning of this subsection, another recent but far-reaching development is the advent of meta-calibration (hereafer MetaCal). First introduced in Huff and Mandelbaum (2017) and [START_REF] Sheldon | Practical weak-lensing shear measurement with metacalibration[END_REF], MetaCal foregoes the need for simulations entirely by instead measuring the shear response14 on observed objects. The general procedure is as follows: the PSF is removed from each object through an analytical deconvolution via the convolution theorem, that is, an element-wise division in Fourier space. This leads to a non-physical image (as the observation was noisy), that can, however, still be sheared. Several different shear values are applied, then the sheared (and original) images are reconvolved with a PSF that is larger than the one used at the deconvolution step. This removes the spurious modes created by the deconvolution. By measuring the shape of each of these reconvolved galaxies, one can compute the numerical derivative of this shape as a function of applied shear, and thus build a shear responsivity matrix that can then be used for calibration. MetaCal has already been successfully applied to real data within the DES survey [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF]. Several aspects of MetaCal we have not mentioned in the brief overview of the method given here require careful handling, especially the issue of noise (as the deconvolution/reconvolution process introduces spurious correlations). We refer the reader to the three papers cited in this subsection (as some new developments are proposed in the real-data application of [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF].

Obtaining redshift information

One last item is worth mentioning, despite not being part of the shape measurement pipeline per se: redshift estimation for the galaxies in our catalog. As mentioned at the end of Section 2.2.4, whether they are used through tomography or a full 3D analysis, redshifts are needed in order to maximize the amount of cosmological information yielded by a WL survey. In fact, even for a 2D cosmic shear analysis, as we might recall from (2.69), we would still need the n(z) for our galaxy sample.

While the best way to measure redshift is through spectroscopic measurements, the sheer size and number of objects involved in WL surveys requires some other, faster (and less costly) way of obtaining per-object redshift estimates. This is typically done through photo-z, that is, the estimation of an object's redshift from the measurement of its photometry in several different bands -which, in practice, amounts to a very low resolution sampling of its spectral energy distribution (SED). To this end, ground-based surveys often observe in several different bands. In the case of Euclid, however, WL measurements will be made from the VIS instrument, which contains only a single, very wide (550-900nm) band. The success of Euclid's WL science objectives is thus dependent on photometric measurements obtained from the ground. This is, for instance, one of the main goals of the CFIS survey, further discussed and analyzed in Appendix B.

Once the photometric data has been acquired, there are two main ways to convert them into redshift estimates: template-fitting (see, e.g., [START_REF] Ilbert | Accurate photometric redshifts for the CFHT Legacy Survey calibrated using the VIMOS VLT deep survey[END_REF] and machine learning (e.g. the well-known artificial neural network (ANN) approach of [START_REF] Collister | ANNz: estimating photometric redshifts using artificial neural networks[END_REF]. [START_REF] Salvato | The many flavours of photometric redshifts[END_REF] give a very up-to-date (at the time of this writing) review of the field. For an example of a recent application to a WL survey, we once again refer the reader to the first HSC data release, for which the photo-z measurements are described in [START_REF] Tanaka | Photometric redshifts for Hyper Suprime-Cam Subaru Strategic Program Data Release 1[END_REF].

Lastly, let us briefly mention clustering redshifts, an alternative approach where spatial cross-correlations with a sample of spectroscopically-identified redshifts are used. See [START_REF] Morrison | THE-WIZZ: clustering redshift estimation for everyone[END_REF] (and references therein) for an overview of the method, an open-source code 15 , and a comparison to KiDS photo-z.

Point Spread Function

Let us now turn to the main topic of the rest of this thesis: PSF estimation. The images we use for WL purposes are obtained from telescopes, which means they -like any other image from an optical imaging device -are slightly distorted. The origins of this distortion are various: diffraction effects, imperfect optics, for instance due to the polishing of mirrors, and possibly stray light propagating within the instrument. All these make up the optical PSF, that we shall focus on in most of the following chapters. For ground-based surveys, the effect of the atmosphere further contributes to the final PSF, and is the main driver for the development of spacebased telescopes. In space, there are other contributions to the PSF, such as the jitter of the spacecraft once in orbit [START_REF] Ma | Diagnosing space telescope misalignment and jitter using stellar images[END_REF], and the effect of the Attitude and Orbit Control System (AOCS). When these are included, we call the resulting PSF the system PSF.

The effect of the final PSF on an image is a convolution; by definition, the PSF is the kernel of that convolution. The imaging process, that is, how the actual, continuous intensity profile of an object I on the sky (which we consider as already including the effects of gravitational lensing) is transformed by the imaging process is 15 https://github.com/morriscb/The-wiZZ/ illustrated in Figure 2.9. Galaxies undergo a convolution by the PSF that alters their shape, and are further sampled on a finite number of pixels, which also contain additive noise. In our case of optical images taken with CCDs, it will always be a safe assumption that the noise is drawn from a white Gaussian distribution.

Applying a convolution to a point source simply results in the convolution kernel. Unresolved stars in the field should be point sources, and therefore give us measurements of the PSF; however, they also undergo the imaging process, and we thus only have access to noisy realizations of our PSF. The PSF modelling task is, starting from these, at the bottom right of Figure 2.9, to build an estimator of the true PSF, in the central column, that we can then combine with the observed galaxy in the top right, through some shape measurement scheme (see Section 2.3.7), to obtain an estimate of the true galaxy in the top left, or at least of its shape.

The PSF varies as a function of position within the focal plane; this is especially true for ground based surveys, as light arriving with different incidence angles has gone through different atmospheric turbulences, but also holds true for the optical PSF. Stars therefore do not directly give us (degraded) samples of the PSF H, but rather samples, at a fixed set of locations, of a spatially varying function H(x, y). PSF modelling therefore also entails an interpolation, as illustrated in Figure 2.10. In the case of ground-based surveys, where the atmospheric component varies quickly, this estimation needs to be carried out on a per-image basis. Spacebased telescopes are a lot more stable, and it is in principle possible to combine several exposures to build the PSF model. However, even a space telescope undergoes changes as time passes, which in turn leads to a varying PSF, as was realized early on in WL studies using the HST (see, e.g., [START_REF] Heymans | Cosmological weak lensing with the HST GEMS survey[END_REF][START_REF] Schrabback | Cosmic shear analysis of archival HST/ACS data-I. Comparison of early ACS pure parallel data to the HST/GEMS survey[END_REF]. In this case, the leading factor was found to be a slight defocus that altered the PSF of ACS-acquired images. The temperature of the spacecraft, which varies with time, and particularly with the relative position of the Sun, also impacts its individual components, and thus the PSF.

Beyond the very intuitive nature of the importance of the PSF modelling step to WL studies that we have already mentioned, its practical implications were made evident very early on. One of the "first four" detections of cosmic shear was that of [START_REF] Van Waerbeke | Detection of correlated galaxy ellipticities on CFHT data: first evidence for gravitational lensing by large-scale structures[END_REF], using observations made at the CFHT, and was quickly followed-up by Visible and InfraRed Multi-Object Spectrographs (VIRMOS)-Dark matter from Ellipticity Sources CARTography (DESCART; [START_REF] Van Waerbeke | Cosmic shear statistics and cosmology[END_REF], one of the very first cosmological WL-oriented surveys, that yielded significant constraints on cosmological models. [START_REF] Hoekstra | The effect of imperfect models of point spread function anisotropy on cosmic shear measurements[END_REF] later showed that the PSF model used was insufficient to capture the full extent of spatial variations. This prompted a reanalysis of the same data, including a more accurate PSF model, in [START_REF] Van Waerbeke | Dealing with systematics in cosmic shear studies: New results from the VIRMOS-DESCART survey[END_REF], which drastically changed the values of the mass aperture statistics (one of the derived second order statistics we discussed at the end of Equation 2.2.4), as shown in Figure 2.11. The apparent bump at scales of θ ap ≈ 5arcminutes in the original analysis, for instance, completely disappears with the new model, and was thus likely due solely to the PSF model imperfections. To complement this striking (and early) example, in Section 2.4.1, we will present a more general framework to measure the impact of PSF modelling error on WL.

There are two different approaches to the PSF modelling problem. Our knowledge of the instrument can be used to build a model of the optical PSF, which gives us a simulator of the PSF, the parameters of which can then be fitted to the stars. For this reason, these are often called parametric, or physical, models. Since it is, in principle, impossible to know the atmospheric component of the PSF in ground-based surveys a priori, this approach has, so far, only been used with space-based telescopes (though see our discussion of Piff below).

For WL, the only example of such, up to now, has been the HST. Parametric models of its ACS instrument are obtained using the TinyTim software [START_REF] Krist | Simulation of HST PSFs using Tiny Tim[END_REF].

In the non-parametric16 , or empirical, approach, knowledge of the instrument (if available) is not used, and the PSF model is built instead using only the available data, that is, the unresolved stars in the field.

As mentioned, this has been the preferred approach to deal with ground-based surveys, since the atmospheric contribution can then be estimated on a per-image basis. Even for space-based surveys, however, it is desirable to pursue a non-parametric approach: in the aforementioned case of HST, both [START_REF] Jee | Principal component analysis of the time-and positiondependent point-spread function of the Advanced Camera for Surveys[END_REF][START_REF] Hoffmann | A study of PSF models for ACS/WFC[END_REF][START_REF] Hoffmann | A study of PSF models for ACS/WFC[END_REF] found that they outperformed the TinyTim physical model, for WL and for photometric purposes. Moreover, a physical model is only as good as our assumptions about the physics of the instrument. Any effect left unaccounted for will be entirely missed, while in principle non-parametric approaches could recover them. They also should be less susceptible to unexpected surprises, for instance a non-nominal launch of the instrument that has a higher-than-expected impact on its components. Lastly, and most importantly, developing both approaches allows for their eventual combination, likely leading to a better PSF model than either method taken separately.

After introducing the formalism for propagation of PSF errors in the next subsection, in Section 2.4.3, I attempt to give an exhaustive list of all PSF modelling approaches (both parametric and non-parametric) used in, or developed for, cosmological WL applications.

Impact of PSF modelling on shear measurements

Beyond the intuitive notion that an incorrect PSF model would interfere with galaxy shape measurement, and thus directly impact the cosmological results derived from cosmic shear, and the very early practical realization that this was indeed very true (see Figure 2.11), a need for a way to quantify the impact of PSF modelling errors on shear measurements naturally arises. It could allow us to control the ultimate impact of our PSF models on science results, or even to set requirements. There is no such thing as a perfect model, but if we know how the PSF errors propagate, we can start from a requirement, say, on the tightness of our constraint on the Dark Energy EOS parameters in (2.46), allocate a budget to different sources of systematic errors, including those related to the PSF, and use that propagation scheme to convert this budget into a maximum allowed PSF error. We can then derive objectives for the quality of the PSF model.

Such a propagation framework was first proposed by [START_REF] Paulin-Henriksson | Point spread function calibration requirements for dark energy from cosmic shear[END_REF], working with the quadrupole moments we introduced in Section 2.3.7. This work was further expanded by [START_REF] Massey | Origins of weak lensing systematics, and requirements on future instrumentation (or knowledge of instrumentation)[END_REF]. While the latter also included both detector effects and those due to the shape measurement approach in their work, in this section, I will consider only the PSF-related terms of their proposed formalism.

Let us then consider a galaxy with complex ellipticity, defined from its quadrupole moments as in (2.96), e gal (which already includes the contribution of gravitational effects) and size, defined in (2.99), R 2 gal . After undergoing the first step of the imaging process of Figure 2.9, that is, convolution by a PSF of ellipticity and sizes e PSF , R 2 PSF , the resulting profile has shape

e obs = e gal + R 2 PSF R 2 gal + R 2 PSF (e PSF -e gal )
(2.105) and

R 2 obs = R 2 gal + R 2 PSF .
(2.106)

The quantity of interest in (2.105) is e gal , while what we have access to in practice are measurements of all observed and PSF quantities. Using (2.106), we can rewrite

e gal = e obs R 2 obs -e PSF R 2 PSF R 2 obs -R 2 PSF .
(2.107)

From this equation, it would appear the only quantities of interest in a PSF model are its size and ellipticity; however, this is due to our assumption of being in an ideal case of quantities derived from unweighted quadrupole moments, as we shall see shortly.

As a first step, however, let us keep considering these quantities. To study the impact of errors in the reconstructed PSF, let us consider an imperfect PSF model. Since its ellipticity and size are the only quantities related to the PSF appearing in (2.107), let us simply consider δ(R 2 PSF ) and δe PSF , the errors in those quantities present in our model. Note that at this stage, whether these errors actually occur from the model itself (that is, the PSF model has a different shape than the true PSF), or from our incapacity to correctly measure the shape of our PSF (e.g. because we cannot measure unweighted quadrupole moments in practice, even on a noiseless PSF model) makes no difference.

The key idea to propagate these errors into our galaxy shape measurement is to perform a Taylor expansion of (2.107) with regards to the shape of the PSF. At first order, this gives

êgal ≈ e gal + ∂e gal ∂ R 2 PSF δ(R 2 PSF ) + ∂e gal ∂e PSF δe PSF , (2.108)
where êgal is the object ellipticity computed using the imperfect model rather than the true PSF. The two partial derivatives are readily computable from (2.107), and yield (dropping the gal notation for quantities relative to the galaxy)

êi = e i         1 + δ(R 2 PSF ) R 2 gal         -         R 2 PSF R 2 gal δe PSF i + δ(R 2 PSF ) R 2 gal e PSF i         , (2.109)
where we have separated the ellipticity into its individual components i ∈ {1, 2}. This is the famous expression derived by [START_REF] Paulin-Henriksson | Point spread function calibration requirements for dark energy from cosmic shear[END_REF] (their equation 8, or the 26 th in [START_REF] Massey | Origins of weak lensing systematics, and requirements on future instrumentation (or knowledge of instrumentation)[END_REF]. This expression has been widely used by the WL community, for instance to study the number of stars required to achieve a given PSF model accuracy [START_REF] Paulin-Henriksson | Optimal point spread function modeling for weak lensing: complexity and sparsity[END_REF], to quantify the quality of a given PSF model on real data [START_REF] Rowe | Improving PSF modelling for weak gravitational lensing using new methods in model selection[END_REF][START_REF] Jarvis | The DES Science Verification weak lensing shear catalogues[END_REF], see Section 2.4.2), and, significantly, to set requirements on WL surveys [START_REF] Cropper | Defining a weak lensing experiment in space[END_REF].

There are a few more interesting observations worth making from (2.109). First, remember the usual linear parametrization of shear bias of (2.104). Taking the average of (2.109) across a large number of objects of size R 2 gal , and under the common assumptions of (2.86-2.87), we get the predicted contributions (of the PSF modelling) to multiplicative and additive biases, (2.111) respectively. Since we split (2.107) into both components instead of using the complex notation, we can point out that the expected multiplicative bias should be the same across both, while the additive bias depends on the PSF's own ellipticity, leading to a different c i for i ∈ {1, 2}. We can also already see, from (2.109), how the way the PSF impacts shape measurement is twofold: both the PSF's intrinsic shape, e PSF , R 2 PSF , and our knowledge of those quantities will impact the measured shapes. From a mission design perspective, this can be directly linked to the questions of hardware and software: a WL survey should, ideally, aim to have both a very small and isotropic PSF (hardware/instrument design), and an excellent PSF model to recover these values with high accuracy (software/data processing).

m PH := δ(R 2 PSF ) R 2 gal , (2.110) and c PH i := -         R 2 PSF R 2 gal δe PSF i + δ(R 2 PSF ) R 2 gal e PSF i         ,
Cropper et al. ( 2013) use (2.109) (among many other factors) to develop a top-down approach: starting from science requirements (i.e. constraints on cosmological parameters), they obtain requirements on both the instrument and our ability to process its data. This is, in a way, the opposite of the bottom-up approach of the Massey et al. ( 2012) companion paper we have been focusing on. This can be achieved by injecting (2.109) into the definition (2.80-2.81) of the shear 2PCF, then propagating the terms arising because of the errors to our constraints on cosmological parameters, for instance by using the Fisher matrix formalism (though this choice should be made with care, see [START_REF] Wolz | On the validity of cosmological Fisher matrix forecasts[END_REF]Euclid Collaboration et al., 2019).

As we have already mentioned earlier, unweighted quadrupole moments can never be computed in practice because of noise, and thus require apodisation, that is, the use of a window function. This raises the question of how much trust can be put into the predictions we get from (2.109) if the left hand side is, in practice, measured using a window function (or, equivalently, a specific analytical model). In fact, even the terms on the right-hand side likely cannot be estimated with unweighted moments. This is especially true in the case of a diffraction-limited PSF, which has diverging second order moments, which means e PSF is not even defined! [START_REF] Melchior | Weak gravitational lensing with DEIMOS[END_REF] studied the impact of the addition of a window function in the measurement of quadrupole moments and (especially) ellipticity. They show, analytically, that the addition of a window function causes a mixing with higher-order moments of the same object. Following [START_REF] Massey | Origins of weak lensing systematics, and requirements on future instrumentation (or knowledge of instrumentation)[END_REF], let us consider these effects as prefactors, P e and P R , corresponding to the changes in e PSF and R 2 PSF /R 2 gal , respectively. Note that since the only size terms in (2.109) are ratios of PSF and galaxy sizes, the second prefactor is related to that ratio, while the first is only related to PSF quantities. This means that P R is not just a function of the PSF, but also of the object being measured. Both are, of course, dependent on the shape measurement method chosen (and on its hyperparameters, like the window size). We can then add these terms in (2.109), yielding

êi = e i         1 + δ(R 2 PSF ) P R R 2 gal         - 1 P R P e         R 2 PSF R 2 gal δe PSF i + δ(R 2 PSF ) R 2 gal e PSF i         .
(2.112) For a Gaussian PSF, P e and P R are exactly equal to 1 and (2.112) reverts to (2.109). Neglecting those terms is thus likely acceptable for ground-based surveys, where the atmospheric contribution smooths out the PSF. It is far less evident in the case of space-based surveys, however. Beyond the aforementioned undefined ellipticities, the PSF of spaceborne instruments often suffers from far stronger ellipticity gradients, that is, the ellipticity of their profile varies with the radius around center used to compute it (see Figure 2.12 for an illustration). In other words, since the weighted measurements of e PSF are strongly dependent on the chosen window function, so is P e . In Chapter 3, we will address this issue, and indeed show that the simpler formulation of (2.109) no longer holds in the case of Euclid.

While the addition of P R and P e will prove sufficient to make this point, it should be noted that [START_REF] Massey | Origins of weak lensing systematics, and requirements on future instrumentation (or knowledge of instrumentation)[END_REF] in fact go further in that they also consider the error made in determining P R itself. This is achieved by considering a weighted version of (2.107), then adding the first-order term in δ(P R ) in (2.108). They note that the same treatment could be applied to errors in P e , though these would act in the exact same way as δe PSF . In light of the results of next chapter, however, I think even this additional term might be worth explicitly taking into account, as even for one given PSF model, P e would still vary from a shape measurement method to another.

A couple of alternatives to this formalism have already been suggested to quantify the impact of PSF errors on shear measurement. [START_REF] Lu | Testing PSF interpolation in weak lensing with real data[END_REF] propose to use real data, in a somewhat similar heuristic to that used in calibration schemes (see Section 2.3.8). As is commonly done to assess the quality of a PSF model a posteriori, they separate their star sample into two, and only use one of the sets to build their PSF model. Figure 2.12: Illustration of the "ellipticity gradient" in a space telescope's PSF. Each point shows the two ellipticity components measured on the same simulated Euclid PSF, from a noiseless, very large image with extremely small pixel sampling rate (much more so than that of the VIS detector). The green point shows the measured ellipticity with no weight function (save for the truncation at the edges of the large stamp), the blue one with a Gaussian weight with the size recommended for internal use within the Euclid Consortium (EC) 17 , and the red ones with different square truncations with N pixels around the center.

They then perform galaxy simulations, complete with an applied shear, as would be done in a simulation-driven calibration approach, but they convolve the profile with the stars they left aside. They then perform their shape measurement using both the "true PSF" (i.e. the observed star) and their reconstruction of it. The difference in shear biases found between the two sets of measurement gives their estimation of the contribution of the PSF 18 . While this approach is definitely interesting, especially in its use of real data to try and measure the bias brought by our PSF modelling, the use of noisy star images as ground truth PSFs would be impossible if these were undersampled (as will be the case for Euclid). Even in the absence of undersampling, the use of noisy convolution kernels can be problematic. A PSF model that somehow perfectly reproduced all stars in the field, noise patterns and all, would lead to a measured bias that is strictly zero in this case. Except we know stars are imperfect samples of the true, underlying PSF, so we do not really want our models to perfectly reproduce their properties. For instance, the measurement of ellipticities on all stars in any given exposure is extremely noisy.

The other approach has very recently been proposed by [START_REF] Paykari | Euclid preparation: VI. Verifying the performance of cosmic shear experiments[END_REF]. They construct an "endto-end" framework where all identified sources of errors and/or uncertainty on our measurement of shear are applied on an object-by-object basis. Their approach can thus be used to account for more effects than just those related to the PSF (though it is one of the two they chose as example for this first application), and comes with the added benefits of treating all considered effects simultaneously, thus also capturing potential crosseffects, and taking into account effects that arise as a function of sky position (e.g. because of where the CCD mosaic falls with each pointing, which in turn creates patterns in where PSF and detector effects occur across the whole survey).

Real data diagnostics

If we assume (2.109) to hold true, we can use it to build PSF model diagnostics applicable to real data. We can see that the quantities impacting galaxy shape measurement are the residuals in ellipticity and size,

δ(e PSF i ), δ(R 2 PSF )/R 2 PSF .
All the experiments we will carry out in the main chapters of this thesis use simulations where we had access to the ground truth PSF. We can thus compute the true values for these residuals. On real data, these quantities must be estimated using stars.

As discussed in Section 2.3.7, measurements of shape parameters from quadrupole moments are ex-tremely sensitive to noise. Building PSF diagnostics based on (2.109) will thus require averaging over large numbers of objects. [START_REF] Rowe | Improving PSF modelling for weak gravitational lensing using new methods in model selection[END_REF] proposed a set of such statistics, expanded by [START_REF] Jarvis | The DES Science Verification weak lensing shear catalogues[END_REF]. These are defined as follows:

ρ 1 (θ) = δe * PSF (x)δe PSF (x + θ) ,
(2.113)

ρ 2 (θ) = e * PSF (x)δe PSF (x + θ) ,
(2.114)

ρ 3 (θ) =        e * PSF δR 2 PSF R 2 PSF        (x)        e PSF δR 2 PSF R 2 PSF        (x + θ) ,
(2.115)

ρ 4 (θ) = δe * PSF (x)        e PSF δR 2 PSF R 2 PSF        (x + θ) ,
(2.116)

ρ 5 (θ) = e * PSF (x)        e PSF δR 2 PSF R 2 PSF        (x + θ) ,
(2.117)

where * denotes complex conjugation. The ρ statistics are therefore made up of all the combination of 2-point auto-and cross-correlations between the shape residual terms (in ellipticity and size) appearing in (2.109), as well as those with the actual PSF shape. These are the terms that appear when injecting equation (2.109) into the computation of the shear 2PCF, ξ + , defined in (2.80). Their impact on the latter can be expressed as

δξ + (θ) =2 R 2 PSF δR 2 PSF R 2 gal R 2 PSF ξ + (θ) + R 2 PSF R 2 gal 2 ρ 1 (θ) -α R 2 PSF R 2 gal ρ 2 (θ) (2.118) + R 2 PSF R 2 gal 2 ρ 3 (θ) + R 2 PSF R 2 gal 2 ρ 4 (θ) -α R 2 PSF R 2 gal ρ 5 (θ),
where α is the PSF leakage term defined in (3.46) (see [START_REF] Jarvis | The DES Science Verification weak lensing shear catalogues[END_REF], for a recipe to estimate it from real data). Equation (2.118) can then be used to transfer requirements on the accuracy of the 2PCF into requirements on the ρ statistics. Another appeal of the ρ statistics is that they can be used, as originally suggested by Rowe (2010), as a mean to compare different PSF models. They can, in fact, even be used to compare the quality of PSF models across different surveys. See Appendix B for an application to the CFIS survey.

Past and current PSF models

Let us now review all PSF models for WL, starting with all those already applied on real data, as shown in Table 2.2 (and footnotes therein).

"Shape interpolation"

As can be seen in Table 2.2, the vast majority of early WL studies used what I have named "shape interpolation" for PSF modelling. These early works used the KSB method (or some variant thereof) to measure the shapes of galaxies, and KSB only requires specific quantities related to the PSF to carry out the correction, rather than a full pixel model. These are the anistropic smearing, and the isotropic damping (as even a round PSF causes a galaxy to become more circular). "Shape interpolation" as a PSF model thus amounted to measuring the shape of stars, then interpolating those quantities across the field. This interpolation was, in most cases, carried out polynomially. A significant exception to that is the early CFHT/CFH12K-based surveys we mentioned at the beginning of this section, for which [START_REF] Hoekstra | The effect of imperfect models of point spread function anisotropy on cosmic shear measurements[END_REF] built a tailored interpolation function. [START_REF] Chang | Atmospheric point spread function interpolation for weak lensing in short exposure imaging data[END_REF] also proposed PSFENT, an interpolation scheme for star shapes based on maximum entropy. This approach was meant to handle the high (spatial) frequency variations induced by atmospheric distortions in ground-based surveys with short exposure times (Heymans et al., 2012a) better than polynomial models could. On ground-based surveys, this shape interpolation was carried out exposure-by-exposure. HST-based studies made use of the telescope's stability, and used exposures with dense stellar fields (e.g. observations of globular clusters) to build the PSF model; see for instance [START_REF] Rhodes | Measurement of cosmic shear with the Space Telescope Imaging Spectrograph[END_REF]'s model for the Space Telescope Imaging Spectrograph (STIS) instrument (where corrective terms are added to a polynomial model of shapes), and [START_REF] Schrabback | Cosmic shear analysis of archival HST/ACS data-I. Comparison of early ACS pure parallel data to the HST/GEMS survey[END_REF], where different PSF models are built on each available dense star field, then the few stars from each WL-useable exposure are used to select the closest model among those, in order to recover the PSF model corresponding to the closest defocus value.

Another interesting exception to this early trend of interpolating only the shape of the PSF is that of [START_REF] Kaiser | Large-scale cosmic shear measurements[END_REF] (another of the "First four"), where a spatially-varying model of the PSF in full pixel domain was used (with further treatment, closer to the standard shape interpolation approaches of the time, for some identified failure modes). The PSF at field position (x, y) is then constructed as

Ĥ(x, y) := j A j (x, y)S j , (2.119)
where each S j is a full image (rather than just a set of measurements of the shape of the PSF). The A j coefficients were chosen to be linearly varying. This is extremely similar to the non-parametric approaches that would appear several years later, and which we shall now describe.

Principal Components Analysis (PCA)

In most cases, building a non-parametric PSF model boils down to selecting a way to construct both the A and S terms in (2.119). The most natural way to determine the latter from data is the use of PCA [START_REF] Dunteman | Principal Components Analysis[END_REF], which can be either carried out on some quantities related to the PSF (e.g. some measurements of shape, like in the above methods), or on actual star images themselves. In this case, the elements of S are once again full images, sometimes referred to as eigenPSFs.

The use of PCA was first proposed, specifically for use in WL, by [START_REF] Jarvis | Principal component analysis of PSF variation in weak lensing surveys[END_REF], though it was already the method of choice for PSF modelling in the general SDSS pipeline [START_REF] Lupton | The SDSS imaging pipelines[END_REF], where they refer to PCA as the Karhunen-Lo ève transform), and was used for the subsequent WL measurements by [START_REF] Lin | The SDSS co-add: cosmic shear measurement[END_REF] and [START_REF] Huff | Seeing in the dark-I. Multi-epoch alchemy[END_REF] (the former further perform a correction of shape residuals, akin to the shape interpolation method described above). PCA also led to the final model used for WL analysis with the HST [START_REF] Schrabback | Evidence of the accelerated expansion of the universe from weak lensing tomography with COSMOS[END_REF]. Their latest use on real data was in [START_REF] Jee | Cosmic shear results from the Deep Lens Survey. I. Joint constraints on Ω m and σ 8 with a two-dimensional analysis[END_REF]'s processing of the Deep Lens Survey (DLS) data.

The choice of a set of A functions for each principal component, or eigenPSF, S j , is then a matter of traditional spatial interpolation. [START_REF] Gentile | Interpolating point spread function anisotropy[END_REF] give a review of several such standard approaches, with application to GREAT3 data.

PSFEx

Bertin (2011)'s PSFEx can be considered the gold standard in (freely available) non-parametric PSF estimation. Designed as a companion software to SExtractor, the two were initially intended to be used in conjunction to perform both the PSF modelling and the shape measurement (by model-fitting) steps. Though PSFEx has never been used in this manner for WL on real data, it is for instance one of the methods applied to simulations by [START_REF] Martinet | Euclid preparation: IV. impact of undetected galaxies on weak-lensing shear measurements[END_REF] in their study of undetected galaxies and their impact on shear measurements. It is applied, in a slightly modified form (to only use the PSF modelling part), in several current WL surveys, namely DES [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF] and HSC [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF]. See also Appendix B for our own application to CFIS.

The PSFEx model is polynomial, up to a user-set degree d, in any chosen set of SExtractor parameters.

By default, these are, naturally, field positions, leading to ĤPSFEx (x, y) = p,q≥0 p+q≤d x p y q S pq .

(2.120)

The set of basis functions S can be chosen either by fitting the parameters of a chosen model or, by default, by learning a full pixel model. A first guess S 0 is then estimated from a median image of all available observations (reshifted to the same grid), and the final S := S 0 + ∆S is then learned by minimizing

min ∆S χ 2 (∆S ) + T ∆S 2 F .
(2.121)

We will return to the χ 2 term and define it explicitely in Equation 3.3.1 of next chapter. For now, let us simply state that it is, as indicated by its name, a data fidelity term that ensures the model recovers the profile of the observed stars. In Section 3.1.2, we shall introduce and discuss the need for regularization in inverse problems;

the right-hand term in (2.121) is one such, namely a Tikhonov regularization. In the case of PSFEx, T is chosen to be scalar, and this term favors solutions S with smaller l 2 norms.

This default configuration (polynomial dependence on positions and data-derived pixel basis functions) is the one in which PSFEx was always ran in in WL surveys. Note that in this case, in order to rewrite (2.120) in the general form of (2.119), we only have to define 19∀i, A i := (x

p i y q i ) p+q≤d .
(2.122)

By doing so, we recast the problem solved when building the PSFEx model as one of matrix factorization, as is our own proposed approach we will present in Chapter 3.

LensFit

LensFit [START_REF] Miller | Bayesian galaxy shape measurement for weak lensing surveys-I. Methodology and a fast-fitting algorithm[END_REF][START_REF] Kitching | Bayesian galaxy shape measurement for weak lensing surveys-II. Application to simulations[END_REF]) is a Bayesian shape measurement approach of the modelfitting class. It was the method used to process the CFHTLenS data, for which a non-parametric PSF modelling approach was also developed [START_REF] Miller | Bayesian galaxy shape measurement for weak lensing surveys-III. Application to the Canada-France-Hawaii Telescope Lensing Survey[END_REF]. The name LensFit is now often used to identify the whole suite of methods, which also includes others steps described in Section 2.3 beyond PSF modelling and shape measurement. It was one of the entries in the GREAT3 challenge, under the name "MaltaOx" [START_REF] Mandelbaum | GREAT3 results-I. Systematic errors in shear estimation and the impact of real galaxy morphology[END_REF]. It is also currently being used in KiDS, as described in [START_REF] Kuijken | Gravitational lensing analysis of the Kilo-Degree Survey[END_REF], which incidentally provides greater detail of the PSF part than the initial [START_REF] Miller | Bayesian galaxy shape measurement for weak lensing surveys-III. Application to the Canada-France-Hawaii Telescope Lensing Survey[END_REF] paper. Here, we shall focus on the PSF modelling part of LensFit, which I will simply refer to as LensFit.

Unlike PSFEx, which builds a set of basis functions that contain as many pixels as the desired final model, the LensFit model is fitted pixel-by-pixel. The value of each pixel is a polynomial combination of positions, up to a user-set order d (called n in [START_REF] Kuijken | Gravitational lensing analysis of the Kilo-Degree Survey[END_REF]. A significant improvement over PSFEx, which needs to be fitted on each CCD separately, is that LensFit can be fitted jointly on the whole exposure. The discontinuities in the PSF caused by the jump from one CCD to the next are handled by fitting the polynomial coefficients up to a certain (also user-set) degree, n c ≤ d, separately on each detector.

One way to recast the LensFit model into our notation from (2.119) is thus as follows. Consider each S j to be an image with a single non-zero pixel. There would then be as many as the desired number of pixels in the final model (in KiDS, this number was chosen to be 35 × 35, at the same pixel scale as that of the instrument). Let c denote the CCD number, and N D the number of CCDs in the camera mosaic. We then have

ĤLensFit (x, y) := j               p,q≥0 p+q≤n c         x p y q N D k=1 1 {c(x,y)=k} a ( j) kpq         + p+q>n c p+q≤d x p y q a ( j) 0pq               S j .
(2.123)

Note that, with these notations, LensFit uses predetermined S j 's and the free parameters to be fitted to star observations are, for each pixel j,

A j := a ( j) kpq k,p,q
.

(2.124) This is the opposite of PSFEx, where the A were predetermined by (2.122), and S learnt from the data. When fitting the A j 's, each star is given a weight

w i := ν 2 i ν 2 i + 50 2 , (2.125)
where ν i is the integrated star SNR on its exposure.

The number of free parameters per pixel is then

N coeff = 1 2 (d + 1)(d + 2) + (N D -1)(n c + 1)(n c + 2) .
(2.126)

In both CFHTLenS and KiDS, the parameters were chosen to be d = 3, n c = 1, after comparison of the quality of the models resulting from several different values on a subset of the data. This led, for instance, to a number of free parameters N coeff = 103 for KiDS (carried out with the OmegaCAM instrument that has N D = 32 CCDs).

While this may seem unreasonably high, it should be kept in mind that the fitting will be carried out using stars from the whole exposure at once. Assuming a uniform distribution of stars on science exposures, this means a factor of about N D more datapoints than would be available on each CCD. Let us mention one last important specificity of LensFit that arises because it treats each pixel separately. So far in this section, we have used (x, y) to denote the position, within an image, of an object. The true centroid of this object is highly unlikely to fall precisely at the center of a pixel. We must thus consider each real object to be sampled with an intra-pixel shift, corresponding to the difference between an arbitrary position within the pixel grid and that of its true centroid. This is illustrated in Figure 2.13. When comparing an observed star with a PSF model, one of the two needs to be shifted so that both are sampled on the same grid. In most cases (e.g. PSFEx), the model is shifted to match each star. The opposite is true of LensFit, however, where the observations are all shifted to a common grid. While this allows for each pixel to be treated independently, this shifting, carried out using a sinc function, implies performing an intra-pixel interpolation on noisy observations.

TinyTim

We have already cited TinyTim [START_REF] Krist | Simulation of HST PSFs using Tiny Tim[END_REF] as the only example of a physical PSF model applied in a WL context. The software can be used to build a model of the ACS on board the HST, the only spaceborne telescope used for cosmological WL to date. Its specific use (and modifications) in this case are detailed by [START_REF] Rhodes | The stability of the point-spread function of the Advanced Camera for Surveys on the Hubble Space Telescope and implications for weak gravitational lensing[END_REF]. Like later, PCA-based models used in the COSMOS surveys, TinyTim is ran with various defocus levels, which were found to be the main driver in the temporal variations of the PSF. All the resulting models are compared with the few available stars in the extragalactic exposures to select the best match, which corresponds to finding the closest defocus level. This PSF model was the one used to build the first COSMOS shape catalog [START_REF] Leauthaud | Weak gravitational lensing with COSMOS: galaxy selection and shape measurements[END_REF], though as we already mentioned, later analysis found a non-parametric approach to yield more accurate models.

Shapelets

Shapelets [START_REF] Refregier | Shapelets-I. A method for image analysis[END_REF] are a particular set of basis functions, that were originally considered for use in galaxy shape measurement. In this case, the PSF itself can be decomposed in the shapelet basis [START_REF] Refregier | Shapelets-II. A method for weak lensing measurements[END_REF], and the correction can then be applied in shapelet space.

Every PSF modelling method we have presented up to now has been used in cosmic shear surveys. To the best of my knowledge, this is not the case of a shapelet-based PSF model. It has, however, been used by [START_REF] Romano | Abell 611-I. Weak lensing analysis with LBC[END_REF] to perform a WL study of the Abell 611 object (which they also compared to a KSB measurement, with standard "shape interpolation" as PSF model). They build a shapelet decomposition of their stars, then interpolate the shapelet coefficients with a fourth-order polynomial, which amounts to using the shapelet basis functions as S in (2.119). A shapelet-based entry was also submitted to the GREAT10 Star Challenge under the name "Gaussianlets" [START_REF] Kitching | Image analysis for cosmology: results from the GREAT10 star challenge[END_REF]. Fourier [START_REF] Zhang | Accurate shear measurement with faint sources[END_REF] is the latest in a series of papers proposing a shape measurement approach, Fourier quad, that was one of the main entries in the GREAT3 challenge [START_REF] Mandelbaum | GREAT3 results-I. Systematic errors in shear estimation and the impact of real galaxy morphology[END_REF]. Like other momentsbased methods introduced in Equation 2.3.7, it relies on computing the quadrupole moments of the galaxy images, though this computation is done in Fourier rather than direct space. To carry out the PSF correction, the Fourier transform of the PSF model at the position of the galaxy is used, which in turn naturally brings forth the idea of performing the PSF modelling step in Fourier space. Similar to LensFit in the direct domain, a pixel-by-pixel interpolation is carried out from the Fast Fourier Transform (FFT; [START_REF] Cooley | An algorithm for the machine calculation of complex Fourier series[END_REF] of the star postage stamps, potentially after applying some noise mitigation scheme [START_REF] Zhang | Testing shear recovery with field distortion[END_REF].

One particular consequence of carrying out the PSF modelling in Fourier space is that application of the FFT leads to centered postage stamps, and thus circumvents the issue of intra-pixel shifts and interpolation of noisy objects that, as mentioned, LensFit suffers from. Moreover, [START_REF] Lu | Removing the impact of correlated PSF uncertainties in weak lensing[END_REF] recently proposed an approach to remove correlations occurring because of remaining errors in the PSF model. While this is currently the only approach that can deal with PSF modelling errors a posteriori, it is method-dependent, i.e. it can only be applied in the specific case of a Fourier PSF model used with Fourier quad as the shape measurement.

Machine Learning

Let us once again turn to our equation (2.119), and equate the non-parametric PSF modelling to that of finding an appropriate representation space. As mentioned, PCA is one of the most classical ways to obtain such a representation. More recently, unsupervised machine learning methods have often been used to carry out this task. Their application to the PSF modelling problem was already considered by the MegaLUT team of the GREAT3 challenge and briefly mentioned in [START_REF] Mandelbaum | GREAT3 results-I. Systematic errors in shear estimation and the impact of real galaxy morphology[END_REF].

An approach based on ANNs is presented in the PhD thesis of [START_REF] Kuntzer | Machine-learning methods for weak lensing analysis of the ESA Euclid sky survey[END_REF]. This approach requires a very large training set of "true PSFs", which typically would have to be obtained through simulations. This then raises the concern of whether these PSF simulations can be made to be sufficiently realistic. Another approach, proposed by [START_REF] Herbel | Fast point spread function modeling with deep learning[END_REF], uses a Convolutional Neural Network, also trained on simulations, to produce PSF models from a set number of parameters that can be measured from stars on actual data. This in turn allows them to produce PSF models that match the properties seen on data, with their use in simulations (rather than shape measurement) in mind.

VIS physical model

We now turn to two PSF models that have, at the time of this writing, not yet been described in published work, but are under active development and planned to be used in some of the main ongoing and upcoming WL surveys. The first is a physical (or parametric) model of the VIS PSF, which will be described in detail in Duncan et al. (in prep) 20 . It contains both a physically-motivated "simulator" of the PSF, the VIS equivalent to ACS's TinyTim, and a fitting approach to select the parameters of this model from observed, undersampled stars in Euclid images (including some planned calibration fields). An early version of this model is used and briefly described in [START_REF] Paykari | Euclid preparation: VI. Verifying the performance of cosmic shear experiments[END_REF].

The bulk of the original work we will present in later chapters of this thesis also aims at building a VIS PSF model, albeit within a non-parametric framework. Our approach and this one are currently being developed entirely independently, which is desirable both for redundancy and cross-validation. As we already mentioned, however, ultimately combining the two approaches is likely to lead to a better PSF model than either could achieve separately.

Piff

The idea of such an hybrid approach, combining a physical and an empirical model of the PSF so that the latter can capture and correct for effects missed by the former, was already suggested over a decade ago by [START_REF] Jarvis | Telescope optics and weak lensing: PSF patterns due to low order aberrations[END_REF]. It is one of the planned features of Piff (PSFs In the Full FOV), a new PSF modelling Python package. Its development, led by Mike Jarvis, is already at quite an advanced stage21 .

Miscellaneous

Let us now briefly mention a few other noteworthy works in the field of PSF modelling. In the list we have just built, several models create a full image of the PSF, often by working directly from the pixels of the star images to construct their own basis S . This is, for instance, the case of PSFEx, when ran in its default configuration. While this setting is the most widely used, PSFEx also allows for the use of predetermined basis functions (namely, either the polar shapelets introduced by Massey and Refregier, 2005, or a user-provided set). In a similar vein, and analogously to what is done when performing model-fitting for galaxy shape measurement, one can in principle select an analytical profile, fit its free parameters to the observed stars, then interpolate those over the field positions to obtain a PSF model. This was attempted in the variable PSF branch of the GREAT3 challenge by the CEA-EPFL team, who used an elliptical Moffat profile [START_REF] Moffat | A theoretical investigation of focal stellar images in the photographic emulsion and application to photographic photometry[END_REF].

When using such an approach, like with many others (e.g. PCA or shape interpolation), the choice of the interpolation function to use, that is, of the A coefficients in (2.119) remains free, and thus falls into the classical problem of spatial interpolation, for which numerous methods exist. Reviews of several of these are given by Berg é et al. ( 2012); [START_REF] Gentile | Interpolating point spread function anisotropy[END_REF] and, in the specific case of the Fourier approach described above, by [START_REF] Lu | Testing PSF interpolation in weak lensing with real data[END_REF]. A particularly elegant alternative to these classical methods was recently proposed by Ngol è and Starck (2017). It relies on notions of manifold learning and on numerical OT, specifically Wasserstein barycenters, which we shall return to and use profusely in Chapters 4 and 5.

The only examples we have given of physical PSF models so far are those for the HST (TinyTim) and Euclid (Duncan et al., in prep). [START_REF] Davis | Wavefront-based PSF estimation[END_REF] proposed such an approach for Dark Energy Camera (DE-Cam), though as DES is a ground-based survey, a full PSF modelling would also require handling atmospheric effects, once again highlighting the importance of hybrid approaches. In this area, [START_REF] Xin | A study of the point-spread function in SDSS images[END_REF] propose a two-part model for the SDSS PSF, which is, interestingly, somewhat opposite to the hybrid case considered by [START_REF] Jarvis | Telescope optics and weak lensing: PSF patterns due to low order aberrations[END_REF]. The latter suggested using the knowledge of the instrument, that is, of the optical PSF, as a base model, to be complemented by an empirical approach to account for the remaining atmospheric (or otherwise) effects. In contrast, this approach instead uses a physically-motivated model of atmospheric turbulences (namely the von K àrm àn turbulence model, De [START_REF] De Karman | On the statistical theory of isotropic turbulence[END_REF], further convolved with a model aiming at capturing the (unknown) instrumental PSF.

"Pi of the Sky" is a very wide field of view (FOV) -1.5 steradians! -experiment with the early detection of (optical counterparts to) Gamma Ray Bursts as one of its main science drivers [START_REF] Burd | Pi of the Sky-all-sky, real-time search for fast optical transients[END_REF]. This design leads to a very highly distorted PSF toward the edges of the camera. The task of modelling such a PSF is of course quite different from that of WL-oriented surveys, and entails dealing with dramatically stronger variations across the field. [START_REF] Piotrowski | PSF modelling for very wide-field CCD astronomy[END_REF] tackle this challenge using a physical model based on laboratory measurements of the instrument, improved by a fitting procedure using observed stars.

Lastly, let us mention the work of [START_REF] Suksmono | Reconstruction of complex-valued fractional Brownian motion fields based on compressive sampling and its application to PSF interpolation in weak lensing survey[END_REF], who uses a Compressed Sensing approach to interpolate PSF ellipticity field at all positions. This approach should therefore fall under the "shape interpolation" category, yet is remarkable for two reasons. First, it makes full use of the definition of ellipticity as a complex number, by considering the PSF ellipticity field as complex-valued random field. Second, as a compressed sensing approach, it makes use of the same notion of sparsity that we shall introduce and use in our own approach in the next chapter.

Euclid

We now turn our attention to the Euclid mission, main focus of the work presented in this thesis. As with the beginning of this chapter, I shall start from the very general, with a broad overview of the mission, then quickly narrow our scope down to those parts that my PhD work has related to. This will enable us, in particular, to reach an understanding of some of Euclid's specificities, and how they make the modelling of its PSF quite the unique task, from which originates the need for new methods beyond those I presented in Section 2.4.3. For a far more detailed (albeit somewhat aged) overview, we refer the reader to the Euclid Redbook [START_REF] Laureijs | Euclid definition study report[END_REF].

Euclid is a medium-class ESA mission, part of its "Cosmic Vision" program for the 2015 -2025 decade. The main observations will be carried from an eponymous space telescope, the launch of which is planned on a Soyuz rocket in June of 2022. As already mentioned, complementary observations from several ground-based surveys are critical to the overall mission, especially to obtain photo-z measurements. In this section, however, I will focus on the Euclid spacecraft.

The spaceborne observatory will carry out its work, for an expected nominal mission span of 6 years, from the L2 Sun-Earth Lagrange point. It will carry a 1.2m primary mirror, along with two instruments: the visible imager VIS, and a Near Infrared Spectrometer and Photometer (NISP). The scientific exploitation of Euclid data, and the design and construction of these two instruments is the responsibility of the EC, made up of about 1500 members from 14 participating European countries, as well as Canada and the United States of America.

The main science objectives of Euclid are in the field of cosmology, and especially aimed at a better understanding of the "Dark Universe", that is, the distribution of dark matter and the nature of Dark Energy (see Section 2.1.5). This will be achieved through the use of two main cosmological probe: galaxy clustering (including the study of BAO), and WL. Several other scientific results will also be derived, both in cosmology (e.g. via clusters of galaxies) and other areas of astronomy and astrophysics (e.g. exoplanets and solar system objects).

In addition to the three Euclid Deep Fields (EDFs, dubbed EDF North, EDF South and EDF Fornax) that will be observed repeatedly in order to go deeper and probe the high-redshift Universe (which will also be useful for WL, especially calibration; see e.g. [START_REF] Martinet | Euclid preparation: IV. impact of undetected galaxies on weak-lensing shear measurements[END_REF], the Euclid Wide Survey aims to maximize the yield of its two main cosmological probes. As both WL and galaxy clustering rely on the measurement of a large number of objects, the aim is to observe as much of the sky as possible. Figure 2.14 shows the footprint of the Euclid Wide Survey. Since the main objects of interest are distant galaxies, several zones are excluded both to minimize the amount of contaminants and to maximize the quality of such observations. The former criterion naturally leads to the exclusion of the plane of our own galaxy (where most observed objects would be intragalactic) and the Large Magellanic Cloud (LMC), the latter to that of the ecliptic plane (to avoid contamination by zodiacal light cause by our own Sun) and regions of strong reddening (caused by intra-galactic dust and measured to high accuracy by Planck ). Note that Euclid will carry out some observations in those excluded areas, including some calibration fields which might prove particularly useful for PSF modelling. After exclusion of these zones, the Wide Survey amounts to a total of 15, 000deg 2 , which will allow for the detection of billions of galaxies, and a highly precise redshift measurement for tens of millions of them from the spectroscopic part of NISP. The expected number density of galaxies suitable for shape measurement is of 30arcmin -2 , a vast improvement even over the already impressive, current (effective) number density of 21.8arcmin -2 for the HSC survey [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF].

With WL measurements as one of its core objectives, Euclid has been designed with accurate shape measurement as one of the main drivers. While the photometric part of NISP will contribute, along with complementary observations from the ground, to the determination of photo-z, the shape measurement itself will be made using images from the VIS instrument. The VIS focal plane, represented in Figure 2.15, is made up of a mosaic of 6 × 6 CCDs, each of them comprising 4096 × 4132 pixels. The pixel scale is of about 0.1arcsec, leading to a very wide FOV of about 0.57deg 2 . For comparison, the FOV of the HST's ACS instrument, from which the best space-based WL catalogs to date were produced, is about 180 times smaller.

By design, the VIS PSF will allow for an exquisitely small (with an FWHM of less than 0.2arcsec), and highly stable PSF. Nonetheless, because of the properties of the instrument we just detailed, its modelling will involve both the handling of spatial variations that occur both across a very large FOV and that include high spatial frequency variations caused by polishing errors in the mirrors. Star images will further be undersampled, which means a super-resolution step will be required to achieve a properly sampled PSF model. Moreover, all shape catalogs up to now (see Table 2.2) have been established either from the ground, or with the HST. In either case, observations were carried out using fairly narrow filters. Once again, VIS was designed to optimize shape measurement over a very large number of objects, which, by necessity, means over very faint galaxies. A single, very wide band spanning most of the optical domain (from 550 to 900nm) was thus chosen. This, however, comes at the cost of needing to handle the chromatic variations of the PSF. CCDs. The gaps in between them are larger in one of the two directions (corresponding to either "Ysc" or "θ x ", two different conventions used internally within the EC).

None of the methods I presented in Section 2.4.3 can address all of these issues, save for the parametric approach of Duncan et al. (in prep). As we have already argued and illustrated throughout this section, it is highly desirable to also have a non-parametric approach to model the VIS (or any) PSF. Most of the work presented in this thesis, starting with the next chapter, is precisely aimed at working towards a non-parametric PSF model that can handle all of Euclid's specificities.

Chapter 3 In this chapter, we start our PSF modelling efforts in a simplified setting. In particular, while the PSFs we will use to test our model are simulations of the VIS PSF, we do not yet take into account the chromatic variations, and instead assume the PSF to always be sampled at the same wavelength.

Monochromatic PSF field estimation

We begin, in the first half of this chapter, with a brief overview of the mathematical tools our proposed approach relies on. In Section 3.1, I introduce the fields of Inverse Problems, the use of sparsity as a regularization, and how such problems can be solved in practice. Section 3.2 gives a very brief introduction to the few concepts of Graph Theory we will use. Lastly, in Section 3.3, we finally apply all of these tools to the modelling and the interpolation of a (monochromatic) Euclid PSF. These last two subsections largely correspond to (the arXiv v1 of) Schmitz et al. ( 2019

Sparse Signal Processing

The use of sparse representations has proven beneficial to a great many applications, and has deeply impacted the vast field of signal processing. It has also affected our everyday lives, for instance through considerable breakthroughs in data compression. A related area where sparsity has had a profound impact is that of inverse problems, which are precisely what our PSF modelling task will amount to. As with the previous sections, I will start with a general overview of the field, then quickly move on to the specific concepts we will require in order to build our first Euclid PSF model. For a more extensive view of Sparse Signal Processing, see the classical textbook of [START_REF] Mallat | A wavelet tour of signal processing[END_REF], and that of [START_REF] Starck | Sparse image and signal processing: Wavelets and related geometric multiscale analysis[END_REF].

Inverse problems

We have already come to mention inverse problems a few times throughout this thesis; for instance, when performing galaxy shape measurement with model-fitting methods (Equation 2.3.7). Some instances of PSF modelling also rely on solving an inverse problem. In both cases, starting from observations (galaxies and stars, respectively) that are assumed to have resulted from some process F (called the forward operator or, in some cases, the "observation model"), the aim is to invert that process in order to recover some knowledge, X, that could not be measured directly. As an illustration, recall our Figure 2.13. There, an initial, finely sampled PSF H went through the process, F d , of sampling on a pixel grid, leading to observations Y i with coarser pixels. Suppose we started from these observations Y i , considered the forward operator F := F d , and tried to recover the undegraded PSF, X := H, we would effectively be solving an inverse problem. It is, in fact, close to the one we will actually solve in Section 3.3, although it will then take a much more complex (and realistic) form. In the case of our other example, suppose we were fitting a S érsic profile with intensity I, size R e and (S érsic) index n as free parameters, given an ellipticity (e 1 , e 2 ) by application of a shear transformation. Starting with noisy galaxy observations and knowledge of the PSF H, the model-fitting step consists in solving the inverse problem with X := (I, R e , n, e 1 , e 2 ), and

F : X → F d S(I, R e , n) • G (e 1 ,e 2 ) , (3.1)
where F d is still the operator that samples on finite pixels,

S(I, R e , n) : (x, y) → I exp         -b n                x 2 + y 2 R e        1/n -1                 (3.2)
is the S érsic profile (with b n a normalization factor), and the shearing operator is defined as G (e 1 ,e 2 ) : (x, y) →

1e 1 -e 2 -e 2 1 + e 1 x y .

(3.3)

In practice, the forward operator is often not invertible. In those cases, inverse problems are solved by choosing some cost function, L, that measures how well the chosen X reproduces the observations. The aim is then to find the value(s) of X that minimizes this cost, that is, to solve min X E(X) := L(F(X), Y).

(3.4)

We already gave an example of such in (2.121), the cost function solved by PSFEx to build its PSF model.

Solving (3.4) can be achieved by using optimization methods; we will present those used in the present case in Section 3.1.4.

Regularization

Before turning to the practical solving of inverse problems, let us first consider another example. Equation

(2.119) allowed us to cast the PSF modelling problem as the choice of two matrices, S and A. We then saw, through PSFEx and LensFit, examples where A was fixed and S learned from the data, or S fixed and A learned, respectively. When performing PCA, neither are set in advance, and both S and A are computed from the data, with S being the eigenvectors and A the corresponding codes (that is, the coefficients given to each entry of S to reproduce the original datapoints).

PCA thus offers one specific way of solving the general inverse problem that amounts to finding two matrices, S and A, such that observations X are reconstructed through their combination:

X ≈ S A.

(3.5)

This class of inverse problems, called matrix factorization, sets the framework we will use in the second half of this chapter (and generalize in the next). [START_REF] Hadamard | Sur les probl èmes aux d ériv ées partielles et leur signification physique[END_REF] defined "well-posed" problems as those for which a solution exists, is unique, and wellbehaved (in that it varies continuously with the initial conditions, or observations). Problems that do not meet these conditions are ill-posed. Such is the case of most inverse problems.

Consider the case of matrix factorization. For a given set of observations Y, let us choose

L(Y, S , A) := Y -S A 2 F , (3.6)
with . F the matrix Fr öbenius norm, as our loss function. Suppose we found one solution, S * , A * , to our inverse problem. For any scalar α, define

S * := αS * , (3.7) Ã * := 1 α A * .
(3.8)

(3.9)

We have L(Y, S * , A * ) = L(Y, S * , Ã * ), and these new quantities are therefore also a solution. Matrix factorization is then indeed ill-posed, as there exists infinitely many solutions.

Recall how, after introducing the Einstein equations (2.4) in Chapter 2, we found ourselves in the need for additional assumptions (which we found in the Cosmological Principle) in order to be able to find solutions. Similarly, in order to solve ill-posed inverse problems, it is common to use regularization, that is, the addition of constraints on our final solution. A classical example is the Tikhonov regularization, i.e. the addition of an l 2 term to (3.4). The problem solved by PSFEx uses such a regularization, as shown in (2.121).

Sparse representation

Another extremely useful constraint is the use of sparsity. Consider the discrete, 1-dimensional (1D) signal X(t) := sin(π/2 + 2πt), shown in purple Figure 3.1a. We show its FFT, X(k), in Figure 3.1b. Most of X's coefficients are 0: we then say X is sparse in Fourier space.

Suppose we only have access to noisy observations Y, shown in black, in both spaces, in Figure 3.1. In order to recover our initial signal, we can make use of its sparse representation by adding a constraint. The most natural way is to use the l 0 pseudo-norm,

X 0 := i 1 {x i 0} , (3.10)
that returns the count of non-zero entries. Let us then build our cost function as:

• an l 2 term to ensure our reconstruction is close to the observations, the data-fidelity;

• an l 0 term to favour solutions with few non-zero coefficients in Fourier space, the sparsity constraint.

The problem to solve would then be

min X E(X) := Y -X 2 2 + λ X 0 .
(3.11) λ is a new hyperparameter that regulates the trade-off between how close we want to match the observed data, and the importance of our additional constraint. It is typically chosen by using some knowledge about (or estimation of) noise properties. We show the solution (see Section 3.1.5) to (3.11) in red in Figure 3.1a, for λ = 20. The signal is remarkably well recovered despite the poor apparent quality of the observations. This successful recovery is because the assumption of sparsity in Fourier domain was exactly correct. That is not necessarily the case for all signals, of course. However, the same idea can be used by finding other, appropriate representation spaces for the signal of interest. Wavelets are often used to achieve this. They come in several different forms, but can be considered, roughly speaking, as a generalization of the Fourier transform. They have proven invaluable, for instance, in treating natural images. We once again point the reader to Mallat (1999)'s textbook for more details on wavelets and their applications. These have spun many fields, including astrophysics, where the Starlet, or Undecimated Isotropic Wavelet transform [START_REF] Starck | Starlet transform in astronomical data processing[END_REF] has been used to tackle many inverse problems. The Starlet decomposition of a Euclid PSF is shown in Figure 3.2 as example.

Convex optimization

We now turn to the issue of solving (3.4). In some cases, the solution can be found analytically, e.g. when finding the minimum amounts to solving a linear system. In other cases, we must often turn to iterative schemes. If E is differentiable, a necessary condition for X * to be a minimum is

∇E(X * ) = 0. (3.12)
If E is also convex, this condition is sufficient; if it is strongly convex, any such point will be the unique global minimum. The field of convex optimization aims at solving such problems. [START_REF] Nesterov | Lectures on convex optimization[END_REF] provides a recently updated textbook covering the field. Let us note that even when the function we aim to minimize is not convex, it can still be possible (and sensible) to apply convex optimization tools. For instance, in some cases, we might not be interested in finding the global minimum of (3.4), and a local minimum might be sufficient for our purposes. This is often the case when the problem we are solving is aimed at learning a new representation space for our data, e.g. in Chapter 4. We will address the non-differentiable case later in Section 3.1.5.

In convex optimization, finding the point that verifies (3.12) is often achieved through gradient descent:

starting at some initialization X (0) , we will iteratively follow the direction of "steepest descent", that is, the one opposite the gradient: X (1)

X (2) X (2)
X (1) X (t+1) := X (t) -α∇E(X (t) ),

X (0)
(3.13)
where α is the step size and determines how far along this path we will move. As α becomes infinitely small, we are sure that E(X (t+1) ) ≤ E(X (t) ). However, the larger α is, the faster we will move toward the minimum. This is illustrated in Figure 3

.3. If the gradient of E is L-Lipschitzian, that is, ∀(X, Y), ∇E(X) -∇E(Y) ≤ L X -Y , (3.14)
then choosing α ≤ 2/L ensures convergence. If that is not the case, or there is no way to compute L, α can instead be chosen empirically at each iteration using a line search method, for instance Armijo's rule [START_REF] Armijo | Minimization of functions having Lipschitz continuous first partial derivatives[END_REF].

Finding X * that verifies (3.12) amounts to finding the zeros of ∇E. A classical method to find the zeros of a differentiable, smooth function g is the Newton method, t) ) .

X (t+1) := X (t) - g(X (t) ) g (X (
(3.15)

When applicable, the Newton method comes with theoretical guarantees of quadratic convergence. It is therefore tempting to try and apply it in the case of our optimization problem by taking g := ∇E. This is thus only possible if E is twice-differentiable, and in this case its inverse Hessian matrix, ∇ 2 E(X (t) )

-1

appears as the g term in (3.15). Note that in this case, we can see the application of the Newton method as a particular case of the generic gradient descent in (3.13), with a particularly efficient choice of α, at each iteration, as a function of the Hessian.

It is often intractable to compute or invert the Hessian of E in practice. In the same way as α can be empirically chosen at each iteration when L cannot be directly computed, we can instead use an empirical approximation of the Hessian that is updated at each iteration. This scheme is called the Quasi-Newton method. It is a very efficient way to solve optimization problems when the cost function is smooth and there are no added constraints, i.e. when the need for regularization that we saw in Section 3.1.2 does not arise. The most famous Quasi-Newton method is the Limited memory BFGS (L-BFGS) [START_REF] Morales | Remark on "algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound constrained optimization[END_REF], which we will use in Chapter 4 to solve a non-constrained optimization problem.

Proximal methods

Standard gradient descent and Newton methods both require the computation of the gradient of the cost function. This is impossible if it includes a non-differentiable term, as is often the case when we use regularization. For instance, recall our example of denoising with a sparsity constraint in Fourier domain of (3.11); the l 0 pseudo-norm is non-differentiable, and neither of the above approaches can be directly applied. Proximal methods [START_REF] Parikh | Proximal algorithms[END_REF] allow for such problems to be solved, and are an extremely powerful tool to solve constrained optimization problems. They rely on the the proximal operator (Moreau, 1962, "prox" hereafter), defined for a function g as

prox g (Y) := argmin X 1 2 X -Y 2 2 + g(X) .
(3.16)

For a list of the properties of the prox as an operator, we refer the reader to [START_REF] Combettes | Proximal splitting methods in signal processing[END_REF].

Here, we focus on their use in solving minimization problem.

Several functions g that are commonly used for regularization of inverse problems have a closed-form prox.

We shall call these functions proximable. Let us mention a few significant examples of proximable functions that we will use in the present work. For a set C, we define its indicator function as

ι C (X) =        0 if X ∈ C, +∞ otherwise.
(3.17) Note it is different to the (finite) indicator function we have introduced in (2.35). The addition of an ι C (X) term to our cost function therefore enforces the constraint that the final solution should belong to C. This allows for a wide range of regularization. For example, if we want our solutions in R p to contain only positive values, we can set C := R p + . For a convex set C, the prox of ι C is simply the orthogonal projection onto C.

Other important examples are sparsity constraints. In the example of Section 3.1.3, we introduced the l 0 pseudo-norm as a way to enforce sparsity. If g(X) := λ X 0 , with λ a scalar parameter as in (3.11) then its prox is the hard-thresholding operator, defined as

HT λ (X) = 1 {|x i |≥λ} x i i . (3.18)
The l 0 norm is the natural way to enforce sparsity, but has the major caveat that it is not convex. It is therefore common to use the l 1 norm, as a convex relaxation, in its stead. [START_REF] Donoho | Uncertainty principles and ideal atomic decomposition[END_REF] show that the l 1 norm (or any l p for 0 ≤ p ≤ 1) does also promote sparsity and can, in some cases, recover the exact solution that would have been obtained by using the l 0 . With g(X) := λ X 1 , the prox is once again analytically known. It is the Soft-Thresholding operator, Proximal methods aim at solving minimization problems that include both a differentiable and a proximable terms. For their theoretical foundation, proofs of properties and convergence, we refer the reader to the aforementioned general references [START_REF] Combettes | Proximal splitting methods in signal processing[END_REF][START_REF] Parikh | Proximal algorithms[END_REF], or to those related to each specific proximal algorithm. Intuitively, one can think of them as a generalization of the gradient descent approach to the case where the loss function is not differentiable. As an illustration, consider problems of the form

ST λ (X) = 1 {|x i |≥λ} x i - |x i | x i λ i , (3.19)
min X E(X) := f (X) + g(X),
(3.20) with f smooth, differentiable and convex, and g proximable. The Forward-Backward splitting algorithm offers an iterative scheme to solve these problems, namely, X (t+1) := prox αg X (t) -α∇ f (X (t) ) .

(3.21) Note the term inside the prox is the usual gradient descent iteration of (3.13) (the "forward step"). The application of the prox ("backward step") then ensures the constraint expressed by g is enforced. This is illustrated in Figure 3.5 in the case where g := ι C . Note that in this case, the forward-backward splitting is equivalent to the long-used "projected gradient descent".

In the case where there are more than one proximable function,

min X E(X) := f (X) + k g k (X), (3.22)
e.g. because we are enforcing several constraints simultaneously, the problem can be solved by the Generalized Forward-Backward proposed by [START_REF] Raguet | A generalized forward-backward splitting[END_REF]. Lastly, [START_REF] Condat | A primal-dual splitting method for convex optimization involving Lipschitzian, proximable and linear composite terms[END_REF] propose a method to solve problems of the form

min X E(X) := f (X) + k g k (L k X), (3.23)
where the (L k ) k are bounded linear functions. This can, for instance, be used when we want to apply a sparsity constraint to our solution, but within a given representation space. For instance, in our previous example, the l 0

X (2)
X (1) norm was applied to X, the FFT of our solution X. Similarly, when using a non-orthogonal wavelet transform, Φ (e.g. the Starlet transform), the prox of g : X → λ ΦX 1 does not have a closed form, and is often estimated iteratively. Alternatively, one can take L 1 := Φ in (3.23), as was for instance done by [START_REF] Farrens | Space variant deconvolution of galaxy survey images[END_REF] to deconvolve galaxy images from a spatially-varying PSF. All three of these proximal methods are implemented in the freely available ModOpt 1 python package, that we used for the applications presented in the rest of this thesis.

X (0) C f

Alternated minimization

In some cases, such as the matrix factorization example of Section 3.1.2, we want to minimize some cost E that is function of more than one variable, and not multiconvex. That is, while the problem might be convex with regards to each variable taken separately, it is not jointly convex in all of them. A standard example is that of dictionary learning, a particular case of matrix factorization, where we want to learn both a dictionary D and a set of codes Λ2 . This problem typically takes the form

min D,Λ Y -DΛ 2 F + g D (D) + g Λ (Λ), (3.24)
where the g terms enforce some constraint on either or both of D and Λ. Several well-known variants of dictionary learning can be recovered with different choices of g D , g Λ . For instance, the problem of Non-negative Matrix Factorization (NMF) is that where both are chosen to be ι + , by which we denote the indicator function of R p + for any p, the dimensionality of its inputs (in this case, either the dictionary or the codes). See Section 4.1.1 for a quick overview of dictionary learning methods.

A primer on graph theory

In this section, we give a very brief introduction to some graph theory concepts that we will use in our building of a PSF model in next section. Let us first define the Laplacian matrix. Consider an unweighted graph such as that shown in Figure 3.6 (where each vertex i is identified through u i ). We define the degree, d(i), of vertex i as the number of edges connected to it. In our example, we have

d(1) = d(4) = 3, d(2) = d(5) = 1 and d(3) = 2.
The degree matrix D is simply the diagonal matrix with D ii = d(i). It contains information about the graph's connectivity, but none about its actual structure (as we cannot know which vertices contribute to another's degree). This is contained in the adjacency matrix A, which in the unweighted case is simply defined as

A i j =       
1 if there is an edge between vertices i and j, 0 otherwise.

(3.25)

We can now define the Laplacian matrix of a graph as

L = D -A.
(3.26)

In the example of Figure 3.6, the Laplacian would be

L =                      3 -1 -1 -1 0 -1 1 0 0 0 -1 0 2 -1 0 -1 0 -1 3 -1 0 0 0 -1 1                      . (3.27)
The Laplacian matrix is a central tool to graph theory. In the next section, we will introduce the PSF Graph, wherein each vertex will correspond to a star, and the edges will be weighted by a function of the distance in-between them. Generalizing the definition of L to the weighted case is an intuitive procedure. While the adjacency matrix entries up to now only contained a binary information (either two vertices are connected, or they are not), in the weighted case we replace that with the weight on the corresponding edge: the entries of A now tell us quantitatively how connected two vertices are. Similarly, for the degree matrix to quantify the amount of connectivity of a given vertex rather than just count the number of edges, we define the degree of node i as d(i) = j A i j , that is, the sum of the weights carried by all edges connected to vertex i.

As a pathway toward defining wavelets on graphs, [START_REF] Hammond | Wavelets on graphs via spectral graph theory[END_REF] introduced, by analogy with the usual transform, the Fourier transform on graphs. For a graph G with Laplacian L, let (V l ) l denote its eigenvectors. For any function f defined on the vertices of G, we define its Fourier transform as

f (l) := V l , f . (3.28)
Using this definition, one can then set constraints (e.g. sparsity) on the Fourier transform of a graph-valued function. We will use this tool to capture the spatial variations of the Euclid PSF in the next section.

Non-parametric Euclid PSF field recovery

In this section, we start building our non-parametric PSF modelling approach. We first consider a simplified setting that does not yet include all of Euclid's specificities. It will already require us to use the tools we have presented in the first half of this chapter, and will also provide an opportunity to revisit the issue of PSF error propagation of Section 2.4.1. Indeed, we will compare our proposed approach to PSFEx in a Euclidlike setting, leading to two different imperfect PSF models we can use to explore the impact of PSF errors on galaxy shape measurement. In particular, by propagating the errors of both PSF models through different shape measurement methods, we examine whether the usual assumption that these two issues can be treated separately still holds for Euclid.

The aspects of the PSF, and other factors that could impact its modelling, that we leave aside in this section are the following. Binary stars can impact the PSF model if they are not removed from those objects used to fit the PSF model. Since previous work [START_REF] Kuntzer | Stellar classification from single-band imaging using machine learning[END_REF][START_REF] Kuntzer | Detecting unresolved binary stars in Euclid VIS images[END_REF] deals with the identification of such objects, we will assume throughout this thesis that they have already been removed. More generally, in this thesis, we will always work under the assumption that our star catalogs are empty from contamination (except for our work on CFIS data in Appendix B). Detector effects such as CTI and the BFE are also assumed to have been treated separately (see Section 2.3.1). Effects due to the AOCS and guiding errors, on the other hand, would contribute to the PSF as an extra convolutive term. Here, we focus on the optical PSF. In practice, the kernel of the extra convolution should be obtainable from precise time-series measurements of the instrument's AOCS. The system PSF could then be recovered by simply convolving together this kernel with our own optical PSF model.

In Section 2.5, we discussed the large band of the VIS instrument and its implications on the chromatic variations of the PSF [START_REF] Cypriano | Cosmic shear requirements on the wavelength dependence of telescope point spread functions[END_REF][START_REF] Eriksen | Implications of a wavelength-dependent PSF for weak lensing measurements[END_REF]. No existing non-parametric approach can model these variations. We will propose the first one in Chapter 5. It relies on yet another class of mathematical tools, namely numerical OT, that we will introduce and apply in Chapter 4. In this section, we will start our efforts by using the simulated VIS PSF at a single wavelength, which will allow us to use PSFEx for comparison.

The simulations used in this section (further described in Section 3.3. 4 and Ngol è et al., 2015) did not yet include manufacturing and polishing errors. These can induce variations of the PSF that occur on very small spatial scales. As discussed below, the proposed method can by construction handle these high-spatial frequency variations (with the strong caveat that observations need to fall within the area of variation for our model to account for it).

Lastly, the modelling we carry out in the present work is done at a single point in time, with a low number of observed stars. As we already saw was the case for the HST, the telescope will in truth vary with time, which means the PSF modelling should be performed on each exposure separately (or on a set of exposures taken closely enough in time that the temporal variation can be neglected). However, another approach is to include the temporal variation within the non-parametric model itself, and fit it either to several exposures simultaneously, or in an online way, updating the model with each new available exposure. Not only could this improve the quality of the PSF model, it might also help mitigate two serious limitations of the non-parametric method: its quality depending on the number of stars available, and the aforementioned need to observe one precisely at the position of high-spatial frequency variations (which should be constant with time).

In our simplified setting, the two main issues to tackle are the spatial variations of the PSF and the undersampling of star images. Of the methods we presented in Section 2.4.3, PSFEx remains the most widely used method and is, to the best of our knowledge, the only one to deal with both the super-resolution and the spatial variation steps at the same time. [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF] found the PSFEx-based model of the HSC PSF to perform poorly when seeing becomes better than a certain value, close to the threshold at which

PSFEx automatically switches to the super-resolution mode [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF], and could indicate issues with PSFEx's handling of super-resolution (and the need for other non-parametric methods to deal with this problem).

Super-resolution is a well-studied problem in image processing, where sparsity-based methods [START_REF] Starck | Sparse image and signal processing: Wavelets and related geometric multiscale analysis[END_REF] have been shown to perform extremely well. Ngol è et al. (2015) showed this to hold true in the particular case of PSFs. However, contrary to the typical setting of the super-resolution problem where the object of interest is observed several times with slight shifts [START_REF] Rowe | Optimal linear image combination[END_REF], in the case of Euclid, we instead have several undersampled observations of the PSF at different positions in the FOV. Ngol è et al. ( 2016) recently introduced Resolved Components Analysis (RCA), a method specifically designed to handle such a problem, but estimating the PSFs only at star positions.

In this section, we expand the RCA method by capturing spatial variations of the PSF through a set of PSF graphs. We can thus estimate the PSF at any arbitrary position in the field, while preserving all the properties of the RCA-recovered PSF field. This leads to a new approach that can deal, similarly to PSFEx, with both super-resolution and spatial variations. The python library is freely available3 .

The official Euclid requirements for WL are that the overall multiplicative shear bias should be lower than 2 × 10 -3 . As discussed in Section 2.4.1, using the approach of [START_REF] Cropper | Defining a weak lensing experiment in space[END_REF], this in turn leads to stringent requirements on the PSF model accuracy: the root mean square (RMS) error on each ellipticity

component e PSF i i∈{1,2}
should be lower than 5 × 10 -5 , and that on the relative size δR 2 PSF /R 2 PSF (as defined in Section 2.3.7) lower than 5 × 10 -4 . As we will see in the experiments of this section, the proposed approach cannot yet, on its own and using only a small number of stars, achieve these requirements. It does, however, already provide an improvement over PSFEx.

The rest of the section is organized as follows: Section 3.3.1 describes the formalism of the PSF recovery field problem we adopted, Section 3.3.2 gives a quick overview of the RCA method and Section 3.3.3 presents the new PSF field recovery method. In Section 3.3.4, we apply both PSFEx and our approach to recover simplified Euclid-like PSFs and compare the resulting models. We then use them for galaxy shape measurement and study the impact of PSF modelling errors in Sections 3.3.5 and 3.3.6. We give some partial conclusions to this chapter in Section 3.3.7.

Modelling the PSF field from stars Notations

Let us first describe the problem at hand. Let H(u) denote the (unknown) PSF that we wish to estimate; H is a function of u = (x, y), a 2D vector containing the position within the image. It is the full, untruncated PSF intensity profile, and thus outputs a continuous image at any position u. Here and throughout this paper, all such positions will be given in "image" coordinates (i.e. within the instrument's CCDs), since the position of objects on the sky has no influence on the PSF they are affected by. Similarly, here we consider H to be a single PSF that aggregates all effects (e.g. diffraction, imperfect optical elements). In particular, we do not consider the intermediary, relative position of incoming light rays from a given object on each individual optical component. We also consider the spatial variations of the PSF to be slow enough that the entirety of an object whose center lies at position u is affected by the same H(u).

Assume we observe a set of n stars stars across the FOV, at positions U stars := u 1 , . . . , u n stars . Each star i gives us a noisy, undersampled observation of H:

Y i = F (H(u i )) + N i , (3.29)
where N i is a noise vector and F is the degradation operator, i.e. the effect of the realization on the instrument's CCDs. In our case, we separate its effects in two distinct operators,

F = F d • F s . (3.30)
F s is a discrete sampling into a finite number of pixels, which turns each continuous image H(u) into a truncated p × p image sampled at our target pixel size. F d is composed of a sub-pixel shift (as illustrated in Figure 2.13), and a further downsampling matrix M (i.e. the pixel response of our instrument) that can lead to undersampling. Denoting by D the downsampling factor caused by M, the available observations Y i are thus Dp × Dp images. In the following, we will treat them as flattened vectors of size D 2 p 2 . The problem at hand is composed of the two following parts:

• from observations Y := (Y 1 , . . . , Y n stars ), build an estimator Ĥ of the true PSF H at corresponding positions U stars ;

• recover the PSF at the galaxy positions, U gal U stars .

In our present case of undersampled observations, while still discretized, we want our PSF model Ĥ to be sampled on a finer grid than observations (Y i ) i , that is, to counter the effect of F d .

PSFEx

We gave a brief introduction to PSFEx in Equation 2.4.3. Recall from (2.121) that it built its model by solving an inverse problem with a χ 2 data fidelity term and a Tikhonov regularization. Using the notations we just introduced, the former can be defined as

χ 2 (∆S ) = n stars i=1 Y i -F d ([S 0 + ∆S ]A i ) σi 2 2 , (3.31)
where σ2

i contains the estimated per-pixel variances. Here, we include the flux normalization, sub-pixel shifting and potential downsampling (if super-resolution is required) operators in F d . Shifting of the PSF models to the same grid as those of the observed stars is performed, both within PSFEx and for our proposed approach in the upcoming section, through the use of a Lanczos interpolant (as opposed to LensFit that uses, as described in Equation 2.4.3, a full sinc interpolation). where each eigenPSF S j is an image of the same size as the PSF images. Introducing the set of all reconstructed PSFs at star positions, Ĥ = Ĥ1 , . . . , Ĥn stars , we thus have the matrix formulation illustrated in Figure 3.7.

Resolved Components Analysis

Because our data is undersampled, a strong degeneracy needs to be broken: infinitely many finely sampled PSFs would manage to reproduce the observed undersampled stars. RCA manages to break this degeneracy by enforcing several constraints on both S and A that reflect known properties of the PSF field.

1. Low rank : the PSF variations across the field should be capturable through a small number of eigenPSFs r. This can be enforced by choosing S to be of dimension p 2 × r, with r p 2 .

2. Sparsity: the PSF should have a sparse representation in an appropriate basis, which can be enforced through a sparsity constraint on the eigenPSFs.

3. Positivity: the final PSF model should contain no negative pixel values.

4. Spatial constraints: variations of the PSF across the field are highly structured, and the smaller the difference between two PSFs' positions u i , u j , the smaller the difference between their representations Ĥi , Ĥ j should be.

The last of these constraints is achieved through a further factorization of A itself, described in the following subsection.

Spatial regularization on graph

The spatial variations of the PSF across the FOV is highly structured, with both smooth variations that take place across the whole field, and some much more localized changes that only affect PSFs in a small part of it. If we had access to evenly spaced samples, this would amount to variations occurring at different (spatial) frequencies. We could then capture these variations by making each of our eigenPSFs contain information related to a given spatial frequency. Our sampling of the PSF is, however, dependent on the position of stars in the field over which we have no control.

RCA overcomes this hurdle through the introduction of graph harmonics: each row A k of A, which contains the weights given to all observed star positions for eigenPSF k, is associated with a graph. For k ∈ {1, . . . , r}, let P e k ,a k denote the Laplacian (up to a constant multiplication on the diagonal) of the graph associated with A k (and thus to the kth eigenPSF). We define it as

P e k ,a k i j := -1 u i -u j e k 2 if i j, P e k ,a k ii := n stars j=1 j i a k u i -u j e k 2 . (3.33)
From the definition of the Laplacian for a weighted graph given in Section 3.2, we can see that these P e k ,a k are precisely the Laplacian matrices of a fully connected graph with the edge between i and j weighted by 1/ u iu j e k 2 , multiplied (entry-wise) by a matrix LD , defined as

LD := a k Id -                        0 -1 -1 . . . -1 -1 0 -1 . . . -1 . . . . . . . . . -1 . . . -1 0 -1 -1 . . . -1 -1 0                        . (3.34)
In other words, each of our r PSF graphs are fully connected graphs with the edge between positions u i and u j given a weight of 1/ u iu j e k 2 . The role of e k in associating each of our graphs to a certain spatial frequency is straightforward: the higher its value, the stronger the decay in edge weight as the distance between two vertices increases, leading to the graph capturing lower spatial frequencies. Comparing (3.34) to (3.26) gives an intuitive (though unrigorous) interpretation as to the role of a k : it amounts to multiplying the degree matrix of our graph by a k , in turn affecting its overall connectivity. By carefully choosing the parameters of our set of graphs, (e k , a k ) k∈{1,...,n stars } , we can thus make each of them sensitive to different ranges of distances, which leads to the harmonic interpretation. See Ngol è et al. (2016, particularly Sections 5.2, 5.5.3 and Appendix A) for more details, as well as a scheme to select appropriate (e k , a k ) k from the data. We enforce the link between A's rows and their corresponding graph through the addition of a constraint on the former. Namely, we want to preserve the graph's geometry through A so that the amplitude of coefficients associated with a certain eigenPSF varies with the right spatial harmonics. We achieve this as follows: since P e k ,a k is real and symmetric, we decompose it as (3.35) where Σ e k ,a k is diagonal. Let V := V e 1 ,a 1 , . . . , V e r ,a r the matrix made up of the eigenvectors associated with each of our r PSF graphs. Our spatial constraint can now be expressed by further factorizing A by V , and forcing the resulting coefficients α to be sparse. This is illustrated in Figure 3.8. At the end of Section 3.2, we introduced the Graph Fourier transform of [START_REF] Hammond | Wavelets on graphs via spectral graph theory[END_REF]. Here, each line A k containing the coefficients of each star for a particular eigenPSF is a function on the associated PSF Graph. From (3.28), we can see that the matrix V introduced in this subsection is nothing but the concatenation of the eigenvectors associated to each eigenPSF's graph. Factorizing A by V and imposing the rows of the resulting matrix α to be sparse thus simply amounts to imposing the coefficients associated to our eigenPSFs to be sparse in the Fourier domain of each associated graph (themselves capturing, by construction, a particular spatial frequency).

P e k ,a k := V e k ,a k Σ e k ,a k V e k ,a k ,
As mentioned at the beginning of this section, manufacturing and polishing defects in the VIS instrument will inevitably lead to very localized, but strong variations of the PSF at some (fixed) positions. While these are not yet included in the simulated PSFs we use in Section 3.3.4, they should be naturally handled by our proposed approach with the addition of extra eigenPSFs. Each of these additions would diminish the role of constraint 1 (low rankness), but the added graph (and corresponding eigenPSF) would capture only those very localized changes in the PSF. However, all this can only be accomplished if some of the observed stars do fall within the area where these variations occur. As we already discussed, this caveat could be alleviated by adding a temporal component to our model, and fitting it on stars extracted from several different exposures.

Optimization problem

Combining the factorizations illustrated in Figures 3.7 and 3.8, reconstruction of the PSF field at the star positions through RCA amounts to solving the following problem:

min S ,α 1 2 Y -F d (S αV ) 2 F + r i=1 w i Φs i 1 + ι + (S αV ) + ι Ω (α) , (3.36)
where (w i ) i are weights, denotes the Hadamard (or entry-wise) product, Φ is a transform through which our eigenPSFs should have a sparse representation (in our case, Φ will always be the Starlet transform, [START_REF] Starck | Starlet transform in astronomical data processing[END_REF], ι + is the previously introduced positivity indicator function, that is,

ι + : X →        0 if no entry of X is strictly negative, +∞ otherwise. (3.37)
Ω is a sparsity enforcing set, (3.38) and ι Ω its indicator function. Here, α belongs to Ω if each of its row i has at most η i non-zero entries.

Ω := α, ∀i ∈ {1, . . . , r} , (α ) i 0 ≤ η i ,
Breaking down (3.36) into its four summands, we can get a sense of how solving it would yield a PSF model that fits the observations while satisfying the list of constraints we introduced at the beginning of Section 3.3.2. Indeed, the first term is the data fidelity term, which ensures we recover the observed star images after applying the correct undersampling operator. The second term promotes the sparsity of our eigenPSFs, thus satisfying constraint 2. The third term ensures our PSF model only contains positive pixel values, enforcing constraint 3.

The fourth term forces the learned α to be sparse, in turn satisfying constraint 4 as detailed in item 3.3.2. Lastly, as mentioned above, constraint 1 is achieved by setting a low enough number of eigenPSFs r.

Finding the eigenPSFs and their associated coefficients for each star amounts to solving (3.36). This can be done through alternated minimization, that is, by solving in turn for S then for α iteratively. Each minimization is performed through the use of the proximal methods we presented in Section 3.1.5. For more details on how parameters (e k , a k ) k , r, (w i ) i and (η i ) i are set, we refer the reader to Ngol è et al. (2016).

PSF Field Recovery from Graph Harmonics

Spatial interpolation of the PSF

We now turn to the problem of interpolating our PSF model from the positions of stars, U stars , to that of galaxies, U gal .

As discussed in Figure 2.4.3, several standard methods exist to perform spatial interpolation, that is, to estimate the (unknown) value of some function f at a new position u = (x, y) given its measurements at several other positions: ( f (u k )) k . The most natural (and the one used by PSFEx) is probably the use of a polynomial function of positions, i.e. (3.39) where the maximum polynomial degree d is a user selected parameter and the (Q i j ) i, j are chosen such that f (u k ) ≈ f (u k ) at every position where f was observed (in our case, u k ∈ U stars ). Note that the particular set-up of PSFEx shown in (2.120) can be recovered when choosing f := ĤPSFEx and Q i j the PSFEx-learned, image-sized components.

f (u) = i, j≥0 i+ j≤d x i y j Q i j ,
An alternative to the polynomial approach is the use of Radial Basis Function (RBF) [START_REF] Buhmann | Radial basis functions: theory and implementations[END_REF]). An RBF is a kernel ϕ that only depends on the distance between two points. The polynomial formulation of (3.39) can then be replaced by

f (u) = n neighbors i=1 Q i ϕ( u -u i ), (3.40)
where we sum over observed positions of the closest neighbors of u, and the (Q i ) i are, once again, chosen so that f coincides with the observed f at all sampled positions. Broadly speaking, the idea behind these schemes is that the closer a position u i is, the more its observed value f (u i ) should contribute to the estimated f (u), and RBF interpolation can be thought of as a generalization of inverse distance weighting schemes. Note that an assumption underlying the use of RBFs is that the PSF's amount of similarity to its neighbors in f is isotropic, i.e., the same in every direction. Because of its simplicity and good performance exhibited in [START_REF] Gentile | Interpolating point spread function anisotropy[END_REF], we chose to use RBF interpolation in the present work, and selected the commonly used thin plate RBF kernel (see Ngol è and Figure 3.9: Graphical representation of the PSF graph associated with eigenPSF S k . The height of the vertical bar at each position u i corresponds to the amplitude of coefficient A ki .

Starck, 2017, Section 3.2, for a quick discussion of its physical interpretation). In what follows, we always set n neighbors to 15.

Spatial Regularity using RCA Graph Harmonics

Aside from the choice of the spatial interpolator discussed above, one must also decide which function f to interpolate. In our case, where the PSFs are images of p 2 pixels, the simplest approach would be to consider each of these pixels as a scalar function and interpolate it independently from the others. This is what is done by the LensFit model (see Equation 2.4.3). While simple, this approach is extremely sensitive to single-pixel fluctuations, which are not unexpected in our data-driven estimations of the PSF, for instance if some noiserelated artefacts remain.

As mentioned, instead of using p 2 different f scalar functions, PSFEx instead considers f to be R p 2 -valued.

By construction, it performs a polynomial interpolation of its learned components. Spatial interpolation can also be carried within any chosen basis of representation -a typical example being the use of PCA we discussed in Equation 2.4.3, wherein spatial interpolation is carried over the coefficients associated with the first few principal components.

Our proposed approach is to perform this spatial interpolation step within the Graph Harmonics framework of RCA. We showed in item 3.3.2 that the rows of matrix A are functions on a set of graphs, each containing the spatial information related to one particular eigenPSF. This is illustrated in Figure 3.9: the coefficients related to eigenPSF S k encode the spatial variations for a given range of distances. By performing the spatial interpolation in each of the r rows of the RCA-learned A matrix, we are moving along each of the corresponding PSF graphs.

For any new position u, we can then reconstruct a new set of coefficients A u ∈ R p through r RBF applications as in (3.40), and reconstruct the PSF as Ĥ(u) := S A u .

(3.41)

This amounts to adding a new point on the PSF graphs, as shown in red in Figure 3.9. Since S was learned from the observed stars and A u preserves the graph harmonics, this step ensures the constraints we highlighted at the end of Section 3.3.2 are still applied to the new PSF at the galaxy positions. In particular, the spatial constraints are preserved thanks to the PSF graphs.

Note that an additional advantage to this approach lies in the fact that the most computation-intensive steps are performed during the reconstruction of the PSF field through RCA (Section 3.3.2). In a Euclid-like framework where star images are undersampled, if we were to use RCA to perform the necessary superresolution step, the dictionary S and the graph harmonics encoded in A would already be computed. The proposed method can thus perform the spatial interpolation step in a particularly appropriate representation at no additional computational cost save for that of fitting the RBF weights. Conversely, if one wanted to use any other representation, even one as simple as PCA would require the extra computation a spectral value decomposition (SVD).

Comparison of PSF models

Data set

The PSFs we use are simulations of Euclid's VIS PSFs (as described in Ngol è et al., 2015, Section 4.1), located in the central part of the FOV, sampled at a single wavelength of 600 nm. As mentioned at the beginning of Section 3.3, this is a simplification of the true Euclid PSF, since we neglect its chromatic variations, and the detector and guiding effects are absent from the simulations. This data set contains 597 such PSFs, each consisting of a 512 × 512 stamp with a pixel size of approximately 0.0083 arcsecond, i.e. sampled on a much finer grid than the Euclid pixel size. See Figure 3.10 for two examples chosen at some of the top-right-and bottom-left-most positions.

As previously discussed, in a real-life observing situation, the only information (in the non-parametric framework of this thesis) from which we would derive our PSF models would be obtained from stars within the field, which lie at positions different from those where we wish to estimate it. We thus randomly split our sample of PSFs into two parts:

• a training set of 300 PSFs, the position of which we will refer to as "star positions";

• a test set with the remaining 297 PSFs, the position of which we will refer to as "galaxy positions".

The number of stars in our training sample is of order 10 times smaller than the expected average number of usable stars present in a VIS science exposure, though using all the available stars simultaneously would require taking into account the variations of the PSF across different CCDs. In Figure 3.3.4, we will only use the PSFs at star positions to try and produce estimations of the PSF at the galaxy positions. Conversely, from Section 3.3.5 on, we will solely focus on and use objects at the galaxy positions.

Euclid's sampling frequency is at 0.688 of the Nyquist rate, which sets our goal in terms of super-resolution at achieving an upsampling factor of 1/D = 2 [START_REF] Cropper | Defining a weak lensing experiment in space[END_REF]. To simulate observed stars, we sample all 300 PSFs in the training set at the nominal Euclid pixel scale of 0.1 arcsecond. This is achieved by first applying a mean filter (which amounts to the approximation that the VIS pixel response is a perfect top hat), then sampling pixels at the correct rate. We apply a random sub-pixel shift to each resulting image, then truncate the stamps to be of size 21 × 21 around the pixel closest to the object's centroid. Indeed, in observing situations, our PSF models would likely (definitely, in the cases of both PSFEx and RCA) be fitted on image stamps containing a suitable star extracted from the full image as described in Section 2.3.3. Our models would thus necessarily need to deal with the resulting truncation effects. Lastly, we add various levels of white Gaussian noise with standard deviation σ, yielding five different sets of observed stars at average SNR of 10, 20, 35 and 50, where the SNR is defined as

SNR = x 2 2 σ 2 p 2 , (3.42)
for image x of size p × p. An example of the resulting star images is shown in Figure 3.11.

From these, we will estimate the PSF at twice the Euclid pixel sampling and at the galaxy positions in For comparison purposes, we also prepare a set of "known" PSFs Ĥkn at those positions, by sampling the 297 test PSFs at half of Euclid's pixel size and truncating the resulting images to 42 × 42 pixels. While not the ideal case (where the continuous PSF image would be perfectly known), this fiducial, unattainable case amounts to the best possible PSF our approaches to super-resolution, denoising and spatial interpolation could possibly achieve. Note that this would require some extra conditions to be met, e.g. by the population of random shifts undergone by the undersampled images (which is, under the safe assumption that shifts are randomly distributed, also directly related to the number of observed stars). Using the notations of Section 3.3.1, Ĥkn would be the the PSF obtained if only F s remained while F d had been perfectly corrected for. In other words, the only effects degrading these PSFs are those of sampling (at our target of half Euclid's pixel size), and truncation at the best possible stamp size given that of our star images.

PSF modelling

We first assume the star images described in Section 3.3.4 were already extracted, and we perform both superresolution and spatial interpolation using RCA, as described in subsections 3.3.2 and 3.3.3. This yields a set of 297 RCA-estimated 42 × 42 PSFs, ĤRCA , at galaxy positions per SNR level.

PSFEx was designed to run on catalogs extracted using companion software SExtractor, and thus requires a little more setting up. For each SNR level, we first create a fake full image of 12 000 × 12 000 pixels, into which the 300 stars are placed at their respective positions 4 . We then run SExtractor on the resulting images, with parameters selected so that all stars are detected and extracted correctly, and no spurious detections occur.

When ran, PSFEx performs a further selection across all objects extracted by SExtractor, which is usually desirable to have the PSF model fitted to appropriate stars. In our case, however, since we already know our SExtractor catalog to be perfect, we tune PSFEx's selection parameters so that as many stars as possible are used. One is nonetheless rejected at SNR 50. The parameters related to the model are the following:

PSF_SAMPLING .5 PSF_SIZE 42,42 PSFVAR_KEYS X_IMAGE,Y_IMAGE PSFVAR_GROUPS 1,1 PSFVAR_DEGREES 2
Namely, PSFEx learns a set of PSF basis elements S i j i, j such that the PSF at position x, y is estimated as in (2.120), with d = 2 (repeating the experiments with d = 3 led to very poor PSF models). All other PSFEx parameters are left to their default value. Again, this gives us one set of estimated PSFs per SNR level, ĤPSFEx , with the same stamp and pixel sizes as Ĥkn and ĤRCA .

Examples of Ĥkn , ĤRCA and ĤPSFEx , at the galaxy position corresponding to the simulated PSF on the left-hand side of Figure 3.10, are given in Figure 3.12 for the worst and best-case noise scenarii.

Results

In Section 2.4.1, we saw that Equation (2.109) was often used as a basis to study the quality of a PSF model. As discussed then, it is unclear whether this equation would hold true in the case of Euclid. Before answering this question, we first quantify the quality of our PSF by looking at the errors that appear in (2.109), i.e. δ(R 2 PSF ), δe PSF i , for both models, on the 297 test PSFs.

For the former, both models tend to overestimate the size of the PSF, likely because super-resolution is performed on a small sample of very narrow objects. This size error has a much stronger contribution to the quantities in (2.109) than the ellipticity error. RCA already reduces this bias in our current set-up, with an improvement of about 24% at all noise levels. This still leads to a RMS on the relative size δ(R 2 PSF )/R 2 PSF that is about 10 4 times too high to match the requirements. Beyond the need to use more stars simultaneously to build the model, which also emerges from every other current shortcoming of our approach, this strong bias will already be greatly reduced in a more realistic Euclid scenario, since a broadband PSF is necessarily broader than the monochromatic PSF we are considering in this work, regardless of the target object's SED.

The values of the true PSF ellipticity at each "galaxy position" in our test set is shown in Figure 3.13. The corresponding ellipticity residuals for each PSF model, δe PSF i , and their distribution across all positions are shown respectively in Figures 3.14 and 3.15, when computed on stars with SNR 35. Noticeable residuals are present for both methods, though they are of lower amplitude in the case of RCA. Figure 3.13 shows a strong asymmetry between the two ellipticity components, with most objects showing mostly horizontally-or vertically-oriented sticks. This indicates the first ellipticity component has both higher values, and much stronger The RMS error per star SNR level is shown in Figure 3.16. We observe the same overall behavior of both PSF models at all star SNRs, with RCA performing better at e 1 recovery, and worse at capturing the much smaller e 2 variations. As mentioned at the beginning of this section, Euclid's requirements for weak lensing are that the RMS on both PSF ellipticity component should be lower than 5 × 10 -5 . As expected, our purely non-parametric approach is far (at a factor of 100-300) from achieving these requirements on its own and with such few stars, though it already yields a significant improvement over PSFEx.

The RMS on the first ellipticity component gets increasingly worse for higher SNR values in the case of PSFEx, which might indicate the presence of spurious effects in the model that get attenuated by higher levels of noise. It might seem puzzling that the error we observe in the case of RCA is lower for a SNR of 35 than it is for one of 50. We observe the same effect when rerunning RCA on several different realizations of noise at those levels. A natural concern would be that this could indicate the quality of our PSF model gets worse with decreasing levels of noise; however, the pixel error between our RCA PSFs and the "known" ones does get smaller, as shown in Figure 3.17. These effects illustrate an important point: when building the PSF model, neither RCA nor PSFEx explicitly aim at matching the observed stars' shapes. It is therefore possible that a "better" model, as defined from the actual functionals both approaches aim at minimizing (in Equations 3.36 and 2.121, respectively), leads to a poorer ellipticity component. This is what we observe in Figure 3.16: the PSF model outputted by RCA, when run on given stars, varies smoothly as a function of their noise level. The overall quality of the model monotonically increases with SNR, as seen in Figure 3.17, eventually converging to the model that would be obtained if there were no noise in the input stars. The ellipticity of the model at any arbitrary position also varies smoothly, but there is no guarantee these variations monotonically tend to the true ellipticity. While the effect we observe here is much smaller (and is, in fact, not identifiable visually when -0.1 0.0 0.1

x-coordinate position (deg) ) < δ(e * 1 ). If the SNR was to keep increasing, however, the outer ring would eventually be captured by the model, increasing once again the overestimation of the first component ellipticity.

Impact on galaxy shape measurement

At the end of Section 2.4.1, we discussed how the use of weighted moments introduced prefactors in the usual [START_REF] Paulin-Henriksson | Point spread function calibration requirements for dark energy from cosmic shear[END_REF] formalism, leading to equation (2.112). For a Gaussian PSF, these prefactors are exactly 1. To test whether this remains true in our present case of a Euclid-like PSF, in this section, we perform image simulations and galaxy shape measurement using each PSF model. In particular, we will apply both a moments-based shape measurement method, and one based on model-fitting. While each comes with its own method-dependent biases, we would expect the contribution of the PSF modelling errors to be the same in both cases if the assumption that the prefactors in (2.112) vanish held true.

Galaxies and observations

We perform galaxy image simulations using GalSim [START_REF] Rowe | GalSim: The modular galaxy image simulation toolkit[END_REF]. The galaxy parameters are identical to those used in several branches of GREAT3 [START_REF] Mandelbaum | The third gravitational lensing accuracy testing (GREAT3) challenge handbook[END_REF], themselves based on fitting the COSMOS population. This gives us a population of 2 040 000 galaxies that are either drawn from a single Sersic profile, or composed of both a bulge (following a de Vaucouleurs' profile) and a disk (with an exponential profile). We apply 204 different random shear values, each of them to a set of 10 000 different galaxies. These sets include the 90-degree rotated counterpart to each galaxy, so as to ensure intrinsic ellipticity truly averages to 0.

The main difference between our image simulations and those used in GREAT3 is, naturally, the PSF used. For our study, we randomly assign one of the 297 Euclid PSFs (at galaxy positions) to each of the galaxies, import them in GalSim and perform the convolution with the galaxy profile.

Our observations are then generated by sampling the resulting convolved profile on stamps of 42 × 42 pixels at half the nominal VIS pixel scale, to match our super-resolved PSFs. Note that in a real-life Euclid setting, the observed galaxies would also suffer from undersampling; however, we choose not to take it into account in this work in order to better isolate the effects of imperfect PSF modelling on shape measurement. Similarly, rather than matching the observations' noise level to those we used for the stars, we instead always add white Gaussian noise with σ = 0.01 (leading to an average SNR of about 50).

Shape measurement

With both the estimated PSFs and observed galaxies described in the previous sections, we can now perform the actual shape measurement step. For a given galaxy of intrinsic ellipticity e int = (e int 1 , e int 2 ) and having undergone a shear (g 1 , g 2 ), our shape measurement method yields êi ≈ e int i + g i .

(3.43)

The shear itself can then be obtained by averaging over sets of objects:

ĝ = ê ≈ e int + g = g.
(3.44)

In our case, we know e int is exactly 0. As discussed in Equation 2.3.7, numerous shape measurement methods that yield ê (and thus ĝ) exist. However, they are known to be imperfect and introduce bias (see Section 2.3.8

for how this bias can be calibrated). Since we are interested in the impact of imperfect PSF models, in order to quantify the amount of error that is introduced by the shape measurement itself, we start by measuring the shape of each observed galaxy using the corresponding known PSF Ĥkn . Then, for each of our star noise levels, we repeat the measurement of the same object, both with the RCA-estimated ĤRCA and the PSFEx ĤPSFEx .

As we saw in Equation 2.3.7, there are considerable differences between moments-based and model-fitting methods, especially with regards to how the PSF is taken into account, we perform our experiments with one method of each type. The most well-known moments-based approach is the KSB method, first introduced by [START_REF] Kaiser | A method for weak lensing observations[END_REF]. In the present work, we use its implementation within the HSM [START_REF] Hirata | Shear calibration biases in weak-lensing surveys[END_REF][START_REF] Mandelbaum | Systematic errors in weak lensing: application to SDSS galaxy-galaxy weak lensing[END_REF] library of GalSim, where the size of the (circular) Gaussian window function is matched to that of the observed galaxy. For model-fitting, we use the freely available im3shape package5 described in [START_REF] Zuntz | im3shape: a maximum likelihood galaxy shear measurement code for cosmic gravitational lensing[END_REF]. In the results shown in Section 3.3.6, im3shape was ran with most parameters left to default, except for those related to the images stamp size, noise level, ranges for the estimation of the object's centroid and PSF handling (see Section C.1 in the Appendices for a complete list).

A particular consequence of this is that the model chosen for galaxies is a de Vaucouleurs bulge combined with an exponential disk, which in turn is the exact model used for generating some of our observations (though some others are composed of a Single Sersic profile with index n {1, 4}). However, im3shape thus configured assumes the bulge and disk to have the exact same ellipticity, orientation and relative size, which is not necessarily the case for our simulated galaxies. Nonetheless, this means the actual galaxy profiles used by im3shape are fairly close to that of the observations, perhaps more so than what could be expected from real data. In other words, our model-fitting experiments may not suffer from so-called model bias quite as much as could be expected in a more realistic setting [START_REF] Voigt | Limitations of model-fitting methods for lensing shear estimation[END_REF]. However, our emphasis on the present work is on the effect of PSF modelling errors on galaxy shape measurement, and whether both approaches are similarly affected by them. For a study of the impact of model bias on shape measurement, see [START_REF] Pujol | Shear measurement bias: dependencies on methods, simulation parameters and measured parameters[END_REF].

In some cases, the KSB implementation we used fails to compute the shapes of certain objects, or returns ellipticity estimates with an absolute value of more than 1. When this occurs with any of our three PSFs, we remove these objects from the analysis. This leads to about 72 000 objects being put aside. The exact amount of objects removed per SNR and PSF type are given in Section C.2 of the Appendices. Note the model-fitting approach always provides an estimate of the shape, and thus all 2 040 000 objects are used.

Results

Ellipticity measurements

We first consider the measured shape of galaxies themselves. Regardless of the PSF model and shape measurement method applied, we obtain an estimate of the overall galaxy shape, which includes both its intrinsic ellipticity and the undergone shear as shown in (3.43). As discussed in Equation 2.3.7), both shape measurement approaches suffer from some form of model bias, either because of the window function or the choice of a model, though as mentioned above, in our current set-up, im3shape measurements are fairly exempt from model bias. Regardless, these potentially strong biases are due solely to the shape measurement methods themselves, and should be independent from the PSF modelling. Since the impact of the latter is our focus here, we thus study the relative ellipticity error of the various combinations of PSF models and shape measurements, that is,

(ê kn i -êRCA i ) 2 , (ê kn i -êPSFEx i ) 2 , (3.45)
where the average is taken over all objects. The results are shown in Figure 3.18. Note the overall amplitude of errors is still related to the intrinsic biases of each shape measurement method, which could be alleviated by a proper calibration scheme. However, these results can still be used to inform us about the two PSF models and their impact on galaxy shape estimation.

When using KSB, there is a clear improvement of order 50 -60% in the shape error when using the proposed approach over PSFEx. Similarly to results shown on the PSF models themselves in Figure 3 .3.4, this seems to indicate that both models yield significantly different PSFs, and that our RCA-based approach is more successful at reconstructing the true PSF. Yet, interestingly, the observed difference is much smaller (of order 10 -20%) between the two PSF models when shapes are measured through model-fitting. This would seem to imply that these methods are less sensitive to PSF modelling errors than moments-based methods, which was not an especially expected outcome: for Figure 3.18: Relative ellipticity error on the measured galaxy shapes, for both PSF models, as a function of the star SNR at which they were fitted. The lines indicate errors made when applying KSB, the scattered points errors made when using model-fitting. instance, [START_REF] Pujol | Shear measurement bias: dependencies on methods, simulation parameters and measured parameters[END_REF] found no significant difference in sensitivity on various other potential factors when comparing methods of each type. This difference in behaviour when faced with imperfect PSF models could be related to effects due to mixing with higher-order moments discussed in Section 2.4.1. This will be further studied below.

Shear bias

A second way to study the impact of PSF models is to look at the actual inferred shear itself. In our case, since we know the intrinsic galaxy ellipticities average to 0 (and we can correct for it if not, e.g. if some objects were tagged as outliers and removed from the analysis), we only have to average across a set of 10 000 objects with the same applied shear to obtain our shear estimator, as shown in (3.44).

A common way to parametrize the bias made on shear measurement is to extend it to first order as in (2.104). We then consider m i , c i , the multiplicative and additive shear bias, respectively, for shear component i ∈ {1, 2}. As in the previous subsection, we compute the value of those two parameters for each combination of PSF and shape measurement technique. Once again, we emphasize that the goal of the present work is not to compare shape measurement methods per se, but rather how PSF model errors impact them. The focus should thus be on the differences of c and m values between different PSF models, rather than on the actual values themselves.

In the case of KSB, the distributions of the first component of measured and true shears, as well as the best fit linear regression yielding the two bias values, are shown in Figure 3.19 for the known PSF. The same figures for both our models, with star SNR of 35, are shown in Figure 3.20, with the line corresponding to shear bias in the ideal case shown in black for comparison.

PSF modelling induces a stronger shear bias in both cases, with over a factor of 2 gain in multiplicative bias compared to the ideal scenario. The RCA-based PSF leads to an improvement, in both components, of the multiplicative bias compared to PSFEx, as seen on Figure 3.21 (where, similarly to the ellipticities in Section 3.3.6, we show the relative biases ∆m i , ∆c i after subtracting that measured using the known PSF).

Conversely, Figure 3.20 indicates our RCA-based PSFs lead to a higher additive bias than the PSFEx ones.

This additive bias is present at every star SNR, as shown in Figure 3.22, though it undergoes strong variations. This higher RCA additive bias is especially noticeable on the first of the two shear components, despite both the bias and RMS error on the first component PSF ellipticity being smaller as shown in Figure 3.3.4. A common way to investigate the relationship between PSF and additive bias is to reparametrize (2.104) thus: The line corresponding to first order shear bias is shown for both the PSF models (in color) and the best case scenario (in black). Shape measurement is performed using KSB. (3.46) where α then quantifies the amount of PSF leakage. Note, however, that this quantity can contain both PSF effects that were not fully captured by the shape measurement step, and effects emanating from errors in the PSF model itself. It would therefore not be informative in our present case, where the additive bias appears stronger for the PSF model with the smallest errors despite the same shape measurement being applied in both cases.

+ m i )g i + c i + αe PSF i ,
A study of the shear biases obtained with our different PSF models when using im3shape also seems to indicate the presence of a slight additive bias when using the RCA PSF. This is illustrated in Figure 3.23, which features the same shear 2D densities and linear fit as Figure 3.20, also at star SNR 35, when the shape measurement is performed by model-fitting. In terms of multiplicative bias, the difference between the known and modeled PSFs is much smaller than it was with KSB, and insignificant in between models, which once again seems to indicate a lower sensitivity to PSF modelling errors of model-fitting methods.

Comparison to analytical predictions

These results are already at odds with those predicted by (2.109), since we observe different relative biases introduced by the same PSF model errors depending on the shape measurement used. To better illustrate this discrepancy, for any set of galaxy, true PSF, and PSF model, we compute the expected contribution to recovery is compensated by RCA's smaller δ(R 2 PSF ), which, as previously mentioned, largely outweighs the contribution of the ellipticity error term here. This leads to smaller c PH 2 values when compared with the prediction for PSFEx. However, we see that the biases we observe in practice are strongly dependent on the shape measurement method. With im3shape, the c 2 contribution is indeed smaller for RCA, though they were overestimated by the analytical prediction for both PSF models. With KSB, it is higher for RCA than it is for PSFEx, and while c PH 2 < 0 for both PSF models, they lead to a positive contribution when propagated to KSB-measured shapes.

As discussed at the beginning of Section 3.3.5, we know the analytical predictions are exact when the prefactors in (2.112) vanish. In order to test whether these are the reason for the differences we observed, we generate a new set of simulations. The galaxies have the same properties (size, shape, applied shear) as those described above, but are drawn from a 2D Gaussian distribution. Similarly, the PSF applied have identical shape properties as our Euclid PSFs, but are also Gaussian. Lastly, we recreate a set of "RCA" and a set of "PSFEx" PSFs, Gaussian as well, but with the same shape errors δe PSF i , δ R 2 PSF as those measured on our actual star-fitted models. While we have access to the true galaxy sizes from the GREAT3 input catalogs, the PSF shapes have to be measured in all three cases. We once again used the HSM library of GalSim, which matches the size of the weighting function to the object being measured. We chose the size of our Gaussian PSFs to be the same as that of the matched window, which leads to a constant factor of two in their unweighted and show good agreement with the predicted values. The first few galaxy size bins lead to smaller measured multiplicative biases, though these are only due to the small number of galaxies at these sizes.

Partial conclusion

In this section, we extended a previously proposed approach for PSF estimation, taking necessary steps toward a fully non-parametric approach applicable in the context of the upcoming Euclid survey. A study of the PSF models and their residuals shows our model outperforms the proven and widely used PSFEx. This could indicate a better handling of the super-resolution, as hints at potential issues with PSFEx's super-resolution mode were recently observed in HSC [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF]. Our method is still, however, far from achieving the Euclid requirements. As a non-parametric approach, its main limitation lies in the number of available stars, and a natural path of improvement is thus simultaneous use of stars from different exposures, that is, taking into account the temporal variability of the PSF. The other approach is that of a parametric PSF model, discussed in Figure 2.4.3. Ultimately, the combination of both approaches will likely do better than each taken separately, which warrants further study of non-parametric models, how to improve them, and make them capable of handling the specificities of Euclid's PSF. Despite the improvement in model quality, the use of our approach as the PSF in galaxy shape measurement unexpectedly led to stronger additive shear biases than when using PSFEx. Following this observation, as well as other observed discrepancies, this section also showed that in the case of Euclid, the way the PSF modelling errors impact shear measurement can be more complicated than previously thought and method-dependent.

In particular, the Paulin-Henriksson et al. ( 2008) formalism no longer holds. Our experiments show this is likely coming from additional terms arising from the necessary addition of a window function to compute quadrupole moments. Similar effects could thus occur for any diffraction-limited telescope.

As mentioned at the beginning of this section, up to now we have considered a single monochromatic PSF. This will no longer be an acceptable assumption in the case of Euclid [START_REF] Eriksen | Implications of a wavelength-dependent PSF for weak lensing measurements[END_REF], and aside from the need to use a greater number of stars, a necessary improvement to the presented method and focus of the next two chapters will be to take those chromatic variations into account. We first begin with a methodological chapter, where we present the field of numerical OT, and some developments we recently proposed. These will then be used to capture the chromatic variations of the Euclid PSF in Chapter 5.

In this chapter, we introduce the field of numerical OT. In particular, we will define and present approaches to compute the Wasserstein distance and the associated Wasserstein barycenter. For an overview of the field, see Peyr é and [START_REF] Peyr É | Computational optimal transport[END_REF].

In Sections 3.1.2 and 3.1.6, we have discussed matrix factorization and dictionary learning. As an illustration of the capabilities of OT, this chapter will introduce a new method, Wasserstein Dictionary Learning (WDL), where the linear relation of (3.5) is replaced by the Wasserstein barycenter operator.

As a general method of representation learning, it is applicable to many types of data. This is illustrated by our various applications in Section 4.5 and that of [START_REF] Xu | Distilled Wasserstein learning for word embedding and topic modeling[END_REF], who used (and extended) our method to process hospital admission records. In the context of this thesis, the most relevant is the application of Section 4.5.2. There, we show that OT is particularly suited to capture the chromatic variations of the Euclid PSF. This is done using monochromatic PSFs as training data. In the context of Euclid observations, these will not be available, so this section has no direct practical use. However, it will serve as the central idea from which we will build the first polychromatic PSF model in Chapter 5, using the tools we develop in this chapter.

This method, and the rest of this chapter, is the result of work carried out with my collaborators, Matthieu Heitz, Nicolas Bonneel, Fred Ngol è, David Coeurjolly, Marco Cuturi, Gabriel Peyr é and Jean-Luc Starck. It was published in [START_REF] Schmitz | Wasserstein dictionary learning: Optimal transport-based unsupervised nonlinear dictionary learning[END_REF] (Paper I hereafter).

Partial Introduction

The idea of dimensionality reduction is as old as data analysis [START_REF] Pearson | On lines and planes of closest fit to systems of points in space[END_REF]. Dictionary learning [START_REF] Lee | Learning the parts of objects by non-negative matrix factorization[END_REF], independent component analysis [START_REF] Hyv Ärinen | Independent component analysis[END_REF], sparse coding [START_REF] Lee | Efficient sparse coding algorithms[END_REF], autoencoders [START_REF] Hinton | Reducing the dimensionality of data with neural networks[END_REF] or most simply PCA are all variations of the idea that each datapoint of a high-dimensional dataset can be efficiently encoded as a low-dimensional vector. Dimensionality reduction typically exploits a sufficient amount of data to produce an encoding map of datapoints into smaller vectors, coupled with a decoding map able to reconstruct an approximation of the original datapoints using such vectors. Algorithms to carry out the encoding and/or the decoding can rely on simple linear combinations of vectors, as is the case with PCA and NMF. They can also be highly nonlinear and employ kernel methods [START_REF] Sch Ölkopf | Kernel principal component analysis[END_REF] or neural networks for that purpose [START_REF] Hinton | Reducing the dimensionality of data with neural networks[END_REF].

In this work, we consider a very specific type of encoding/decoding pair, which relies on OT geometry between probability measures. OT geometry, also known as Wasserstein or earth mover's, defines a distance between two probability measures µ, ν by computing the minimal effort required to morph measure µ into measure ν. The original interpretation of [START_REF] Monge | M émoire sur la th éorie des d éblais et des remblais[END_REF] was that µ would stand for a heap of sand, which should be used to fill in a hole in the ground of the shape of ν. The effort required to move the pile of sand is usually parametrized by a cost function to move one atom of sand from any location x in the support of µ to any location y in the support of ν (see Figure 4.1). Monge then considered the problem of finding the optimal (least costly) way to level the ground by transporting the heap into the hole. That cost defines a geometry between probability measures which has several attractive properties. In this paper we exploit the fact that shapes and, more generally, images can be cast as probability measures, and we propose several tools inherited from OT geometry, such as OT barycenters, to warp and average such images [START_REF] Solomon | Convolutional Wasserstein distances: Efficient optimal transportation on geometric domains[END_REF]. These tools can be exploited further to carry out non-linear inverse problems in a Wasserstein sense [START_REF] Bonneel | Wasserstein barycentric coordinates: Histogram regression using optimal transport[END_REF], and we propose in this work to extend this approach to carry out nonlinear dictionary learning on images using Wasserstein geometry.

Previous works

Linear dictionary learning

Several dimensionality reduction approaches rely on using a predefined orthogonal basis upon which datapoints can be projected. Such basis are usually defined without even looking at data, as is the case for Fourier transforms or wavelet-based dictionaries [START_REF] Mallat | A wavelet tour of signal processing[END_REF]. Dictionary learning methods instead underline the idea that dictionaries should be customized to fit a particular dataset in an optimal way. Suppose that the M datapoints of interest can be stored in a matrix X = (x 1 , . . . , x M ) ∈ R N×M . The aim of (linear) dictionary learning is to factorize the data matrix X using two matrices: a dictionary, D, whose elements (the atoms) have the same dimension N as those of X, and a list of codes Λ used to relate the two: X ≈ DΛ.

When no constraints on D or Λ are given, and one simply seeks to minimize the Fr öbenius norm of the difference of X and DΛ, the problem amounts to computing the singular value decomposition of X or, equivalently, the diagonalization of the variance matrix of X. In practical situations, one may wish to enforce certain properties of that factorization, which can be done in practice by adding a prior or a constraint on the dictionary D, the codes Λ, or both. For instance, an l 0 or l 1 norm penalty on the codes yields a sparse representation of data [START_REF] Aharon | K-SVD: An algorithm for designing overcomplete dictionaries for sparse representation[END_REF][START_REF] Mairal | Online learning for matrix factorization and sparse coding[END_REF]. The sparsity constraint might instead be imposed upon the new components (or atoms), as is the case for sparse PCA (d'Aspremont et al., 2007). Properties other than sparsity might be desired, for example, statistical independence between the components, yielding independent component analysis (ICA, Hyv ärinen et al., 2004), or positivity of both the dictionary entries and the codes, yielding NMF [START_REF] Lee | Learning the parts of objects by non-negative matrix factorization[END_REF]. A third possible modification of the dictionary learning problem is to change the fitting loss function that measures the discrepancy between a datapoint and its reconstruction. When data lies in the nonnegative orthant, [START_REF] Lee | Learning the parts of objects by non-negative matrix factorization[END_REF] have shown, for instance, the interest of considering the Kullback-Leibler (KL) divergence to compute such a loss or, more recently, the Wasserstein distance [START_REF] Rolet | Fast dictionary learning with a smoothed Wasserstein loss[END_REF], as detailed later in this section. More advanced fitting losses can also be derived using probabilistic graphical models, such as those considered in the topic modelling literature [START_REF] Blei | Topic models[END_REF].

Nonlinear dictionary learning

The methods described above are linear in the sense that they attempt to reconstruct each datapoint x i by a linear combination of a few dictionary elements. Nonlinear dictionary learning techniques involve reconstructing such datapoints using nonlinear operations instead. Autoencoders [START_REF] Hinton | Reducing the dimensionality of data with neural networks[END_REF] propose using neural networks and to use their versatility to encode datapoints into low-dimensional vectors and later decode them with another network to form a reconstruction. The main motivation behind principal geodesic analysis [START_REF] Fletcher | Principal geodesic analysis for the study of nonlinear statistics of shape[END_REF] is to build such nonlinear operations using geometry, namely by replacing linear interpolations with geodesic interpolations. Of particular relevance to our paper is the body of work that relies on Wasserstein geometry to compute geodesic components [START_REF] Bigot | Geodesic PCA in the Wasserstein space by convex PCA[END_REF][START_REF] Wang | A linear optimal transportation framework for quantifying and visualizing variations in sets of images[END_REF][START_REF] Boissard | Distribution template estimate with Wasserstein metrics[END_REF][START_REF] Seguy | Principal geodesic analysis for probability measures under the optimal transport metric[END_REF], see Section 4.5.1).

More generally, when data lies on a Riemannian manifold for which Riemannian exponential and logarithmic maps are known, [START_REF] Ho | On a nonlinear generalization of sparse coding and dictionary learning[END_REF] propose a generalization of both sparse coding and dictionary learning. Nonlinear dictionary learning can also be performed by relying on the "kernel trick", which allows one to learn dictionary atoms that lie in some feature space of higher, or even infinite, dimension [START_REF] Van Nguyen | Design of non-linear kernel dictionaries for object recognition[END_REF][START_REF] Harandi | Riemannian coding and dictionary learning: Kernels to the rescue[END_REF][START_REF] Liu | Robust kernel dictionary learning using a whole sequence convergent algorithm[END_REF]. Equiangular kernel dictionary learning, proposed by [START_REF] Quan | Equiangular kernel dictionary learning with applications to dynamic texture analysis[END_REF], further enforces stability of the learned sparse codes. Several problems where data is known to belong to a specific manifold are well studied within this framework, e.g. sparse coding and dictionary learning for Grassmann manifolds [START_REF] Harandi | Dictionary learning and sparse coding on Grassmann manifolds: An extrinsic solution[END_REF], or for positive definite matrices [START_REF] Harandi | Sparse coding and dictionary learning for symmetric positive definite matrices: A kernel approach[END_REF], and methods to find appropriate kernels and make full use of the associated manifold's geometry have been proposed for the latter [START_REF] Li | Log-Euclidean kernels for sparse representation and dictionary learning[END_REF]. Kernel dictionary learning has also been studied for the (nonlinear) adaptive filtering framework, where [START_REF] Gao | Online dictionary learning for kernel LMS[END_REF] propose an online approach that discards obsolete dictionary elements as new inputs are acquired. These methods rely on the choice of a particular feature space and an associated kernel and achieve nonlinearity through the use of the latter. The learned dictionary atoms then lie in that feature space. Conversely, our proposed approach requires no choice of kernel. Moreover, the training data and the atoms we learn belong to the same probability simplex, which allows for easy representation and interpretation; e.g. our learned atoms can (depending on the chosen fitting loss) capture the extreme states of a transformation undergone by the data. This is opposed to kernel dictionary atoms, which cannot be naturally represented in the same space as datapoints because of their belonging to the chosen high-dimensional feature space.

Computational optimal transport

Optimal transport has seen significant interest from mathematicians in recent decades [START_REF] Talagrand | Transportation cost for Gaussian and other product measures[END_REF][START_REF] Rachev | Mass Transportation Problems: Theory[END_REF][START_REF] Villani | Topics in optimal transportation[END_REF]. For many years, that theory was, however, of limited practical use and mostly restricted to the comparison of small histograms or point clouds, since typical algorithms used to compute them, such as the auction algorithm [START_REF] Bertsekas | The Auction algorithm: A distributed relaxation method for the assignment problem[END_REF] or the Hungarian algorithm [START_REF] Kuhn | The Hungarian method for the assignment problem[END_REF], were intractable beyond a few hundred bins or points. Recent approaches [START_REF] Shirdhonkar | Approximate Earth Mover's Distance in linear time[END_REF][START_REF] Rabin | Wasserstein barycenter and its application to texture mixing[END_REF] have ignited interest for fast yet faithful approximations of OT distances. Of particular interest to this work is the entropic regularization scheme proposed by [START_REF] Cuturi | Sinkhorn distances: Lightspeed computation of optimal transport[END_REF], which finds its roots in the gravity model used in transportation theory [START_REF] Erlander | The gravity model in transportation analysis: theory and extensions[END_REF]. This regularization can also be tied to the relation between OT and Schr ödinger's problem (Schr ödinger, 1931) (as explored by L éonard, 2014). Whereas the original OT problem is a linear problem, regularizing it with an entropic regularization term results in a strictly convex problem with a unique solution which can be solved with Sinkhorn's fixed-point algorithm [START_REF] Sinkhorn | Diagonal equivalence to matrices with prescribed row and column sums[END_REF], also known as block coordinate ascent in the dual regularized OT problem. That iterative fixed-point scheme yields a numerical approach relying only on elementwise operations on vectors and matrix-vector products. The latter can in many cases be replaced by a separable convolution operator [START_REF] Solomon | Convolutional Wasserstein distances: Efficient optimal transportation on geometric domains[END_REF], forgoing the need to manipulate a full cost matrix of prohibitive dimensions in some use cases of interest (e.g. when input measures are large images). [START_REF] Agueh | Barycenters in the Wasserstein space[END_REF] introduced the idea of a Wasserstein barycenter in the space of probability measures, namely Fr échet means (Fr échet, 1948) computed with the Wasserstein metric. Such barycenters are the basic building block of our proposal of a nonlinear dictionary learning scheme with Wasserstein geometry. Agueh and Carlier studied several properties of Wasserstein barycenters and showed very importantly that their exact computation for empirical measures involves solving a multimarginal optimal transport problem, namely a linear program with the size growing exponentially with the size of the support of the considered measures.

Wasserstein barycenters

Since that work, several algorithms have been proposed to efficiently compute these barycenters [START_REF] Rabin | Wasserstein barycenter and its application to texture mixing[END_REF][START_REF] Carlier | Numerical methods for matching for teams and Wasserstein barycenters[END_REF][START_REF] Solomon | Wasserstein propagation for semi-supervised learning[END_REF][START_REF] Bonneel | Sliced and Radon Wasserstein Barycenters of Measures[END_REF][START_REF] Ye | Fast discrete distribution clustering using Wasserstein barycenter with sparse support[END_REF]. The computation of such barycenters using regularized distances [START_REF] Cuturi | Fast computation of Wasserstein barycenters[END_REF] is of particular interest to this work. [START_REF] Cuturi | A smoothed dual approach for variational Wasserstein problems[END_REF] use entropic regularization and duality to cast a wide range of problems involving Wasserstein distances (including the computation of Wasserstein barycenters) as simple convex programs with closed form derivatives. They also illustrate the fact that the smoothness introduced by the addition of the entropic penalty can be desirable, beyond its computational gains, in the case of the Wasserstein barycenter problem. Indeed, when the discretization grid is small, its true optimum can be highly unstable, which is counteracted by the smoothing introduced by the entropy (Cuturi and Peyr é, 2016, Section 3.4). The idea of performing iterative Bregman projections to compute approximate Wasserstein distances can be extended to the barycenter problem, allowing its direct computation using a generalized form of the Sinkhorn algorithm [START_REF] Benamou | Iterative Bregman projections for regularized transportation problems[END_REF]. [START_REF] Chizat | Scaling algorithms for unbalanced optimal transport problems[END_REF] recently proposed a unifying framework for solving unbalanced optimal transport problems, including computing a generalization of the Wasserstein barycenter.

Wasserstein barycentric coordinates

An approach to solving the inverse problem associated with Wasserstein barycenters was recently proposed [START_REF] Bonneel | Wasserstein barycentric coordinates: Histogram regression using optimal transport[END_REF]: Given a database of S histograms, a vector of S weights can be associated to any new input histogram, such that the barycenter of that database with those weights approximates as closely as possible the input histogram. These weights are obtained by automatic differentiation (with respect to the weights) of the generalized Sinkhorn algorithm that outputs the approximate Wasserstein barycenter. This step can be seen as an analogy of, given a dictionary D, finding the best vector of weights Λ that can help reconstruct a new datapoint using the atoms in the dictionary. That work can be seen as a precursor for our proposal, whose aim is to learn both weights and dictionary atoms.

Applications to image processing

OT was introduced into the computer graphics community by [START_REF] Rubner | The Earth Mover's Distance as a metric for image retrieval[END_REF] to retrieve images from their color distribution, by considering images as distributions of pixels within a 3D color space. Color processing has remained a recurring application of OT, for instance to color grade an input image using a photograph of a desired color style [START_REF] Piti É | N-dimensional probablility density function transfer and its application to colour transfer[END_REF], or using a database of photographs [START_REF] Bonneel | Wasserstein barycentric coordinates: Histogram regression using optimal transport[END_REF], or to harmonize multiple images' colors [START_REF] Bonneel | Sliced and Radon Wasserstein Barycenters of Measures[END_REF]. Another approach considers grayscale images as 2D histograms. OT then allows one to find a transport-based warping between images [START_REF] Haker | Optimal mass transport for registration and warping[END_REF][START_REF]A multiscale approach to optimal transport[END_REF]. Further image processing applications are reviewed in the habilitation dissertation of [START_REF] Papadakis | Optimal Transport for Image Processing[END_REF].

Wasserstein loss and fidelity

Several recent papers have investigated the use of OT distances as fitting losses that have desirable properties that KL or Euclidean distances cannot offer. We have already mentioned generalizations of PCA to the set of probability measures via the use of OT distances [START_REF] Bigot | Geodesic PCA in the Wasserstein space by convex PCA[END_REF][START_REF] Seguy | Principal geodesic analysis for probability measures under the optimal transport metric[END_REF]. [START_REF] Sandler | Non-negative matrix factorization with Earth Mover's Distance metric[END_REF] first considered the NMF problem with a Wasserstein loss. Their computational approach was, however, of limited practical use. More scalable algorithms for Wasserstein NMF and (linear) dictionary learning were subsequently proposed [START_REF] Rolet | Fast dictionary learning with a smoothed Wasserstein loss[END_REF]. The Wasserstein distance was also used as a loss function with desirable robustness properties to address multilabel supervised learning problems [START_REF] Frogner | Learning with a Wasserstein loss[END_REF].

Using the Wasserstein distance to quantify the fit between data (an empirical measure) and a parametric family of densities, or a generative model defined using a parameterized push-forward map of a base measure, has also received ample attention in the recent literature. Theoretical properties of such estimators were established by Bassetti et al. (2006) and Bassetti and Regazzini (2006), and additional results by [START_REF] Bernton | On parameter estimation with the Wasserstein distance[END_REF]. Entropic smoothing has facilitated the translation of these ideas into practical algorithms, as illustrated in the work by [START_REF] Montavon | Wasserstein training of restricted Boltzmann machines[END_REF], who proposed to estimate the parameters of restricted Boltzmann machines using the Wasserstein distance instead of the KL divergence. Purely generative models, namely, degenerate probability measures defined as the push-forward of a measure supported on a low-dimensional space into a high-dimensional space using a parameterized function, have also been fitted to observations using a Wasserstein loss [START_REF] Bernton | On parameter estimation with the Wasserstein distance[END_REF], allowing for density fitting without having to choose summary statistics (as is often the case with usual methods). The Wasserstein distance has also been used in the context of generative adversarial networks (GANs, [START_REF] Arjovsky | Wasserstein Generative Adversarial Networks[END_REF]. In that work, the authors use a proxy to approximate the 1-Wasserstein distance. Instead of computing the 1-Wasserstein distance using 1-Lipschitz functions, a classic result from Kantorovich's dual formulation of OT (see Theorem 1.14 in [START_REF] Villani | Topics in optimal transportation[END_REF], the authors restrict that set to multilayer networks with rectified linear units and boundedness constraints on weights, which allows them to enforce some form of Lipschitzness of their networks. Unlike the entropic smoothing used in this paper, that approximation requires solving a nonconvex problem whose optimum, even if attained, would be arbitrarily far from the true Wassertein distance. More recently, [START_REF] Genevay | Learning generative models with Sinkhorn divergences[END_REF] introduced a general scheme for using OT distances as the loss in generative models, which relies on both the entropic penalty and automatic differentiation of the Sinkhorn algorithm. Our work shares some similarities with that paper, since we also propose automatically differentiating the Sinkhorn iterations used in Wasserstein barycenter computations.

Contributions

In this paper, we introduce a new method for carrying out nonlinear dictionary learning for probability histograms using OT geometry. Nonlinearity comes from the fact that we replace the usual linear combination of dictionary atoms by Wasserstein barycenters. Our goal is to reconstruct datapoints using the closest (according to any arbitrary fitting loss on the simplex, not necessarily the Wasserstein distance) Wasserstein barycenter to that point using the dictionary atoms. Namely, instead of considering linear reconstructions for X ≈ DΛ, our aim is to approximate columns of X ≈ P(D, Λ) using the P operator which maps atoms D with lists of weights Λ to their respective barycenters.

Similar to many traditional dictionary learning approaches, this is achieved by finding local minima of a nonconvex energy function. To do so, we propose using automatic differentiation of the iterative scheme used to compute Wasserstein barycenters. We can thus obtain gradients with respect to both the dictionary atoms and the weights that can then be used within one's solver of choice (in this work, we chose to use an off-the-shelf quasi-Newton approach and perform both dictionary and code updates simultaneously).

Our nonlinear dictionary learning approach makes full use of the Wasserstein space's properties, as illustrated in Figure 4.2: two atoms are learned from a dataset made up of five discretized Gaussian distributions in 1D, each slightly translated on the grid. Despite the simplicity of the transformation (translation), linear generative models fail to capture the changes of the geometrical space, as opposed to our OT approach. Moreover, the atoms we learn are also discrete measures, unlike the PCA and NMF components.

We also offer several variants and improvements to our method:

• Arbitrarily sharp reconstructions can be reached by performing the barycenter computation in the logdomain;

• We offer a general method to make use of the separability of the kernel involved and greatly alleviate the computational cost of this log-domain stabilization;

• Our representation is learned from the differentiation of an iterative, Sinkhorn-like algorithm, whose convergence can be accelerated by using information from previous Sinkhorn loops at each initialization (warm start), or adding a momentum term to the Sinkhorn iterations (heavyball);

• We expand our method to the unbalanced transport framework.

Part of this work was previously presented as a conference proceedings [START_REF] Schmitz | Optimal transport-based dictionary learning and its application to Euclid-like point spread function representation[END_REF], featuring an initial version of our method, without any of the above improvements and variants, and in the case where we were only interested in learning two different atoms.

Additional background on OT is given in Section 4.2. The method itself and an efficient implementation are presented in Section 4.3. We highlight other extensions in Section 4.4. We showcase its use in several image processing applications in Section 4.5.

Notations used in this chapter

We denote Σ d the simplex of R d , that is,

Σ d :=        u ∈ R d + , d i=1 u i = 1        . (4.1)
For any positive matrix T , we define its negative entropy as

H(T ) := i, j T i j log(T i j -1). (4.2)
denotes the Hadamard product between matrices or vectors. Throughout this chapter, when applied to matrices, , ÷, and exp notations refer to elementwise operators. The scalar product between two matrices denotes the usual inner product, that is,

A, B := Tr(A B) = i, j A i j B i j , (4.3)
where A is the transpose of A. For (p, q) ∈ Σ 2 N , we denote their set of couplings as ), respectively. In between the two atoms are the reconstructions of the five datapoints for each method. The latter two were relaunched a few times with randomized initializations and the best local minimum was kept. As discussed in Section 4.2, the addition of an entropy penalty to the usual OT program causes a blur in the reconstructions. When the parameter associated with the entropy is high, our method yields atoms that are sharper than the dataset on which it was trained, as is observed here where the atoms are Dirac despite the dataset consisting of discretized Gaussians. See Section 4.4.1 for a method to reach arbitrarily low values of the entropy parameter and counteract the blurring effect.

Π(p, q) := T ∈ R N×N + , T 1 N = p, T 1 N = q , (4.4)
where

1 N = (1, . . . , 1) ∈ R N . ∆ denotes the diag operator, such that if u ∈ R N , then ∆(u) :=             u 1 . . . u N             ∈ R N×N . (4.5)
For two vectors u, v, KL(.|.) is their KL divergence, defined here as

KL(u|v) = i u i log u i v i -u i + v i . (4.6)
For a concatenated family of vectors t = t 1 , . . . , t S ∈ R NS , we write the ith element of t s as [t s ] i . We denote the rows of matrix M as M i. and its columns as M . j . I N and 0 N×N are the N × N identity and zero matrices, respectively.

Optimal transport

OT distances

In the present work, we restrict ourselves to the discrete setting, i.e. our measures of interest will be histograms, discretized on a fixed grid of size N (Eulerian discretization), and represented as vectors in Σ N . In this case, the cost function is represented as a cost matrix C ∈ R N×N , containing the costs of transportation between any two locations in the discretization grid. The OT distance between two histograms (p, q) ∈ Σ 2 N is the solution to the discretized Monge-Kantorovich problem:

W(p, q) := min T ∈Π(p,q) T, C . (4.7)
As defined in (4.4), Π(p, q) is the set of admissible couplings between p and q, that is, the set of matrices with rows summing to p and columns to q. A solution, T * ∈ R N×N , is an optimal transport plan.

Villani's books give extended theoretical overviews of OT [START_REF] Villani | Topics in optimal transportation[END_REF][START_REF] Villani | Optimal transport: old and new[END_REF] and, in particular, several properties of such distances. The particular case where the cost matrix is derived from a metric on the chosen discretization grid yields the so-called Wasserstein distance (sometimes called the earth mover's distance). For example, if C i j = x ix j 2 2 (where x i , x j are the positions on the grid), the above formulation yields the squared 2-Wasserstein distance, the square-root of which is indeed a distance in the mathematical sense. Despite its intuitive formulation, the computation of Wasserstein distances grows supercubicly in N, making them impractical as dimensions reach the order of one thousand grid points. This issue has motivated the recent introduction of several approximations that can be obtained at a lower computational cost (see Section 4.1.1). Among such approximations, the entropic regularization of OT distances [START_REF] Cuturi | Sinkhorn distances: Lightspeed computation of optimal transport[END_REF] relies on the addition of a penalty term as follows:

W γ (p, q) := min T ∈Π(p,q)
T, C + γH(T ), (4.8) where γ > 0 is a hyperparameter. As γ → 0, W γ converges to the original Wasserstein distance, while higher values of γ promote more diffuse transport matrices. The addition of a negentropic penalty makes the problem γ-strongly convex; first-order conditions show that the problem can be analyzed as a matrix-scaling problem which can be solved using Sinkhorn's algorithm [START_REF] Sinkhorn | Diagonal equivalence to matrices with prescribed row and column sums[END_REF], also known as the iterative proportional fitting procedure [START_REF] Deming | On a least squares adjustment of a sampled frequency table when the expected marginal totals are known[END_REF]. The Sinkhorn algorithm can be interpreted in several ways: for instance, it can be thought of as an alternate projection scheme under a KL divergence for couplings [START_REF] Benamou | Iterative Bregman projections for regularized transportation problems[END_REF] or as a block-coordinate ascent on a dual problem [START_REF] Cuturi | Fast computation of Wasserstein barycenters[END_REF]. The Sinkhorn algorithm consists in using the following iterations for l ≥ 1, starting with b (0) = 1 N :

a (l) = q K b (l-1) , (4.9) b (l) = p Ka (l) ,
where K := exp( -C γ ) is the elementwise exponential of the negative of the rescaled cost matrix. Note that when γ gets close to 0, some values of K become negligible, and values within the scaling vectors, a (l) and b (l) , can also result in numerical instability in practice (we will study workarounds for that issue in Section 4.4.1).

Application of the matrix K can often be closely approximated by a separable operation [START_REF] Solomon | Convolutional Wasserstein distances: Efficient optimal transportation on geometric domains[END_REF] see Equation 4.4.1 for separability even in the log-domain). In the case where the histograms are defined on a uniform grid and the cost matrix is the squared Euclidean distance, the convolution kernel is simply Gaussian with standard deviation γ/2. The two vectors a (l) , b (l) converge linearly towards the optimal scalings [START_REF] Franklin | On the scaling of multidimensional matrices[END_REF] corresponding to the optimal solution of (4.8). Notice finally that the Sinkhorn algorithm at each iteration l ≥ 1 results in an approximate optimal transport matrix T (l) = ∆(b (l) )K∆(a (l) ).

Wasserstein barycenter

Analogous to the usual Euclidean barycenter, the Wasserstein barycenter of a family of measures is defined as the minimizer of the (weighted) sum of squared Wasserstein distances from the variable to each of the measures in that family [START_REF] Agueh | Barycenters in the Wasserstein space[END_REF]. For measures with the same discrete support, we define, using entropic regularization, the barycenter of histograms (d 1 , . . . , d S ) ∈ (Σ N ) S with barycentric weights λ = (λ 1 , . . . , λ S ) ∈ Σ S as

P (D, λ) := argmin u∈Σ N S s=1 λ s W γ (d s , u), (4.10)
where D := (d 1 , . . . , d S ) ∈ R NS . The addition of the entropy term ensures strict convexity and thus that the Wasserstein barycenter is uniquely defined. It also yields a simple and efficient iterative scheme to compute approximate Wasserstein barycenters, which can be seen as a particular case of the unbalanced OT setting [START_REF] Chizat | Scaling algorithms for unbalanced optimal transport problems[END_REF]. This scheme, a generalization of the Sinkhorn algorithm, once again relies on two scaling vectors:

a (l) s = d s Kb (l-1) s , (4.11)
P (l) (D, λ) = S s=1 K a (l) s λ s , (4.12) b (l) s = P (l) (D, λ) K a (l) s , (4.13)
where, as before, K = exp( -C γ ). In this case, however, the scaling vectors are of size NS , such that a

(l) = a (l) 1 , . . . , a (l) S , b (l) = b (l) 1 , . . . , b (l)
S and b (0) = 1 NS . Note that one can perform both scaling vector updates

= 1 2 , 1 2 , 0 , 1 3 , 1 3 , 1 3 , 0, 1 2 , 1 2 . Bottom row, center: 1 2 , 0, 1 2 .
at once (and avoid storing both) by plugging one of (4.11), ( 4.13) into the other. An illustration of the Wasserstein barycenter, as well as the impact of the γ parameter, is given in Figure 4.3.

Wasserstein dictionary learning

Overview

Given data X ∈ R N×M in the form of histograms, i.e., each column x i ∈ Σ N (for instance a list of M images with normalized pixel intensities), and the desired number of atoms S , we aim to learn a dictionary D made up of histograms (d 1 , . . . , d S ) ∈ (Σ N ) S and a list of barycentric weights Λ = (λ 1 , . . . , λ M ) ∈ (Σ S ) M so that for each input, P(D, λ i ) is the best approximation of x i according to some criterion L (see Table 4. Note the similarity between the usual dictionary learning formulation (see Section 4.1.1) and the one above. In our case, however, the reconstruction of the original data happens via the nonlinear Wasserstein barycenter operator, P(D, Λ) = (P(D, λ i )) i , instead of the (linear) matrix product DΛ.

Differentiation of (4.14) relies in part on the computation of the Wasserstein barycenter operator's Jacobians with regard to either the barycentric weights or the atoms. While it is possible to obtain their analytical formulae, for example by using the fact that Sinkhorn updates (4.12-4.13) become fixed-point equations when convergence is reached, they rely on solving a linear system of prohibitive dimensionality for our settings of interest where N is typically large [START_REF] Bonneel | Wasserstein barycentric coordinates: Histogram regression using optimal transport[END_REF], derived the expression with regard to barycentric weights and discussed the issue in their Section 4.1). Moreover, in practice, the true Wasserstein barycenters with entropic penalty P(D, λ i ) are unknown and approximated by sufficient Sinkhorn iterations (4.12-4.13). As is now common practice in some machine learning methods (a typical example being backward propagation for neural nets), and following recent works [START_REF] Bonneel | Wasserstein barycentric coordinates: Histogram regression using optimal transport[END_REF], we instead take an approach in the vein of automatic differentiation [START_REF] Griewank | Evaluating derivatives: principles and techniques of algorithmic differentiation[END_REF]. That is, we recursively differentiate the iterative scheme yielding our algorithm instead of the analytical formula of our Wasserstein barycenter. In our case, this is the generalization of the Sinkhorn algorithm for barycenters. Instead of (4.14), we thus aim to minimize (4.15) where P (L) is the approximate barycenter after L iterations, defined as in (4.12). Even when using an entropy penalty term, we have no guarantee on the convexity of the above problem, whether jointly in D and Λ or for each separately, contrary to the case of OT distance computation in (4.8). We thus aim to reach a local minimum of energy landscape E L by computing its gradients and applying a descent method. By additivity of E L and without loss of generality, we will focus on the derivations of such gradients for a single datapoint x ∈ Σ N (in which case Λ only comprises one list of weights λ ∈ Σ S ). Differentiation of (4.15) yields

min D,Λ E L (D, Λ) := M i=1 L P (L) (D, λ i ), x i ,
∇ D E L (D, Λ) = ∂ D P (L) (D, λ) ∇L(P (L) (D, λ), x), (4.16) ∇ λ E L (D, Λ) = ∂ λ P (L) (D, λ) ∇L(P (L) (D, λ), x).
(4.17)

The right-hand term in both cases is the gradient of the loss which is typically readily computable (see Table 4.1) and depends on the choice of fitting loss. The left-hand terms are the Jacobians of the Wasserstein barycenter operator with regard to either the weights or the dictionary. These can be obtained either by performing the analytical differentiation of the P (l) operator, as is done in Section 4.3.2 (and Appendix D), or by using an automatic differentiation library such as Theano (Theano Development Team, 2016). The latter approach ensures that the complexity of the backward loop is the same as that of the forward, but it can lead to memory problems due to the storing of all objects being part of the gradient computation graph (as can be the case, for instance, when performing the forward Sinkhorn loop in the log-domain as in Section 4.4.1; for this specific case, an alternative is given in Equation 4.4.1). The resulting numerical scheme relies only on elementwise operations and on the application of the matrix K (or its transpose) which often amounts to applying a separable convolution [START_REF] Solomon | Convolutional Wasserstein distances: Efficient optimal transportation on geometric domains[END_REF], see Equation 4.4.1). The resulting algorithm is given in Algorithm 4.1. At first, a "forward" loop is performed, which amounts to the exact same operations as those used to compute the approximate Wasserstein barycenter using updates (4.12-4.13) (the barycenter for current weights and atoms is thus computed as a by-product). Two additional vectors of size S NL are stored and then used in the recursive backward differentiation loops that compute the gradients with regard to the dictionary and the weights. Name L(p, q) ∇L Total variation

p -q 1 sign(p -q) Quadratic p -q 2 2 2(p -q) Kullback-Leibler KL(p|q) log(p/q) -1 Wasserstein 1 W (L) γ (p, q) γ log(a (L) )
Table 4.1: Examples of similarity criteria and their gradient in p. See Figure 4.14 for the atoms yielded by our method for these various fitting losses.

Using the above scheme to compute gradients, or its automatically computed counterpart from an automatic differentiation tool, one can find a local minimum of the energy landscape (4.15), and thus the eventual representation Λ and dictionary D, by applying any appropriate optimization method under the constraints that both the atoms and the weights belong to their respective simplices Σ N , Σ S .

For the applications shown in Section 4.5, we chose to enforce these constraints through the following change of variables ∀i,

d i := F N (α i ) := e α i N j=1 e [α i ] j , λ := F S (β) := e β S j=1 e β j . (4.18)
The energy to minimize (with regard to α, β) then reads as

G L (α, β) := E L (F(α), F S (β)), (4.19)
where F(α) := (F N (α 1 ), . . . , F N (α S )) = D. Differentiating (4.19) yields

∇ α G L (α, β) = [∂F(α)] ∇ D E L (F(α), F S (β)) = [∂F(α)] ∇ D E L (D, Λ) , (4.20)
∇ β G L (α, β) = ∂F S (β) ∇ λ E L (F(α), F S (β)) = ∂F S (β) ∇ λ E L (D, Λ) , (4.21)
where

∂F p (u) = ∂F p (u) = I p -F p (u)1 p ∆ F p (u)
, p being either N or S for each atom or the weights, respectively, and both derivatives of E L are computed using either automatic differentiation or as given in (4.16), (4.17) with Algorithm 4.1 (see Section 4.3.2). The optimization can then be performed with no constraints over α, β.

Since the resulting problem is one where the function to minimize is differentiable and we are left with no constraints, in this work we chose to use a quasi-Newton method (though our approach can be used with any appropriate solver); that is, at each iteration t, an approximation of the inverse Hessian matrix of the objective function, B (t) , is updated, and the logistic variables for the atoms and weights are updated as

α (t+1) := α (t) -ρ (t) α B (t) α ∇ α G L (α, β), β (t+1) := β (t) -ρ (t) β B (t) β ∇ β G L (α, β), (4.22)
where the ρ (t) are step sizes. An overall algorithm yielding our representation in this particular setup of quasi-Newton after a logistic change of variables is given in Algorithm 4.2.

In the applications of Section 4.5, B (t) and ρ (t) were chosen using an off-the-shelf L-BFGS solver [START_REF] Morales | Remark on "algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound constrained optimization[END_REF]. We chose to perform updates to atoms and weights simultaneously. Note that in this case, both are fed to the solver of choice as a concatenated vector. It is then beneficial to add a "variable scale" hyperparameter ζ and to multiply all gradient entries related to the weights by that value. Otherwise, the solver might reach its convergence criterion when approaching a local minimum with regards to either dictionary atoms or weights, even if convergence is not yet achieved in the other. Setting either a low or high value of ζ bypasses the problem by forcing the solver to keep optimizing with regard to one of the two variables in particular. In practice, and as expected, we have observed that relaunching the optimization with different ζ values upon convergence can increase the quality of the learned representation. While analogous to the usual alternated optimization scheme often used in dictionary learning problems, this approach avoids having to compute two different forward Sinkhorn loops to obtain the derivatives in both variables.

Backward recursive differentiation

To differentiate P (L) (D, Λ), we first rewrite its definition (4.12) by introducing the following notations:

P (l) (D, λ) = Ψ(b (l-1) (D, λ), D, λ), (4.23) b (l) (D, λ) = Φ(b (l-1) (D, λ), D, λ), (4.24)
where Finally, we introduce the following notations for readability:

Ψ(b, D, λ) := s K d s Kb s λ s , (4.25) Φ(b, D, λ) :=                 Ψ(b, D, λ) K d 1 Kb 1         , . . . ,         Ψ(b, D, λ) K d S Kb S                 .
ξ (l) y := ∂ y ξ(b (l) , D, λ) , B (l) y := ∂ y b (l) (D, λ) , (4.27)
where ξ can be Ψ or Φ, and y can be D or λ.

We then have l+1) , (4.28)

∇ D E L (D, λ) = Ψ (L-1) D ∇L(P (L) (D, λ), x) + L-2 l=0 Φ (l) D v (
∇ λ E L (D, λ) = Ψ (L-1) λ ∇L(P (L) (D, λ), x) + L-2 l=0 Φ (l) λ v (l+1) , (4.29)
where: l) .

v (L-1) := Ψ (L-1) b ∇L(P (L) (D, λ), x) , (4.30) ∀l < L -1, v (l-1) := Φ (l-1) b v (
(4.31)

See Appendix D for proof.

Extensions

Log-domain stabilization

Stabilization

In its most general framework, representation learning aims at finding a useful representation of data, rather than one allowing for perfect reconstruction. In some particular cases, however, it might also be desirable to achieve a very low reconstruction error, for instance if the representation is to be used for compression of data rather than a task such as classification. In the case of our method, the quality of the reconstruction is directly linked to the selected value of the entropy parameter γ, as it introduces a blur in the reconstructed images as illustrated in Figure 4.3. In the case where sharp features in the reconstructed images are desired, we need to take extremely low values of γ, which can lead to numerical problems, e.g. because values within the scaling vectors a and b can then tend to infinity. As suggested by [START_REF] Chizat | Scaling algorithms for unbalanced optimal transport problems[END_REF] and [START_REF] Schmitzer | Stabilized sparse scaling algorithms for entropy regularized transport problems[END_REF], we can instead perform the generalized Sinkhorn updates (4.12-4.13) in the log-domain. Indeed, noting u (l) s , v (l) s as the dual scaling variables, that is, a (l) s := exp

      u (l) s γ       , b (l) s := exp       v (l) s γ       , (4.32)
the quantity -c i j + u i + v j is known to be bounded and thus remains numerically stable. We can then introduce the stabilized kernel K(u, v) defined as

K(u, v) := exp -C + u1 + 1v γ , (4.33)
and notice that we then have

u (l) s = γ log(d s ) -log(Kb (l-1) s ) , (4.34)
log(Kb (l-1)

s ) i = log          j exp          -c i j + v (l-1) j γ                   (4.35) = log          j K(u (l-1) s , v (l-1) s ) . j          - u (l-1) s i
γ .

(4.36)

With similar computations for the v s updates, we can then reformulate the Sinkhorn updates in the stabilized domain as .38) This provides a forward scheme for computing Wasserstein barycenters with arbitrarily low values of γ, which could be expanded to the backward loop of our method either by applying an automatic differentiation tool to the stabilized forward barycenter algorithm or by changing the steps in the backward loop of Algorithm 4.1 to make them rely solely on stable quantities. However, this would imply computing a great number of stabilized kernels as in (4.33), which relies on nonseparable operations. Each of those kernels would also have to either be stored in memory or recomputed when performing the backward loop. In both cases, the cost in memory or number of operations, respectively, can easily be too high in large scale settings.

u (l) s := γ          log(d s ) -log          j K(u (l-1) s , v (l-1) s ) . j                   + u (l-1) s , (4.37) v (l) s := γ        log(P (l) ) -log        i K(u (l) s , v (l-1) s ) i.               + v (l-1) s . ( 4

Separable log kernel

These issues can be avoided by noticing that when the application of the kernel K is separable, this operation can be performed at a much lower cost. We illustrate this process using 2D kernels without loss of generality. Let X be a 2D domain discretized as an n × n grid. Applying a kernel of the form K = exp(-C γ ) to a 2D image b ∈ X is performed as such:

R(i, j) := n k=1 n l=1 exp - C((i, j), (k, l)) γ b(k, l) , (4.39)
where C((i, j), (k, l)) denotes the cost to transport mass between the points (i, j) and (k, l).

Assuming a separable cost such that C((i, j), (k, l)) := C y (i, k) + C x ( j, l) , it amounts to performing two sets of 1D kernel applications: This operator can be used directly in the forward loop, as seen in Algorithm E.1. For backward loops, intermediate values can be negative and real-valued logarithms are not suited. While complex-valued logarithms solve this problem, they come at a prohibitive computational cost. Instead, we store the sign of the input values and compute logarithms of absolute values. When exponentiating, the stored sign is used to recover the correct value.

A(k, j) = n l=1 exp C x ( j, l) γ b(k, l),

Warm start

Warm start, often used in optimization problems, consists in using the solution of a previous optimization problem, close to the current one, as the initialization point in order to speed up the convergence. Our method relies on performing an iterative optimization process (for example, L-BFGS in the following experiments) which, at each iteration, calls upon another iterative scheme: the forward Sinkhorn loop to compute the barycenter and its automatic differentiation to obtain gradients. As described in Section 4.2.2, this second, nested iterative scheme is usually initialized with constant scaling vectors. However, in our case, since each iteration of our descent method performs a new Sinkhorn loop, the scaling vectors of the previous iteration can be used to set the values of b (0) instead of the usual 1 NS , thus "warm-starting" the barycenter computation. In the remainder of this subsection, for illustrative purposes, we will focus on our particular case where the chosen descent method is L-BFGS, though the idea of applying warm start to the generalized Sinkhorn algorithm should be directly applicable with any other optimization scheme. As an example, in our case, instead of a single L-BFGS step after L = 500 Sinkhorn iterations, we perform an L-BFGS step every L = 10 iterations, initializing the scaling vectors as the ones reached at the end of the previous 10. This technique accumulates the Sinkhorn iterations as we accumulate L-BFGS steps. This has several consequences: a gain in precision and time, a potential increase in the instability of the scaling vectors, and changes in the energy we minimize.

First, the last scaling vectors of the previous overall iteration are closer to that of the current one than a vector of constant value. Therefore, the Sinkhorn algorithm converges more rapidly, and the final barycenters computed at each iteration gain accuracy compared to the classical version of the algorithm.

Second, as mentioned in Section 4.4.1, the scaling vectors may become unstable when computing a large number of iterations of the Sinkhorn algorithm. When using a warm start strategy, Sinkhorn iterations tend to accumulate, which may consequently degrade the stability of the scaling vectors. For example, using 20 Sinkhorn iterations running through 50 L-BFGS steps, a warm start would lead to barycenters computed using scaling vectors comparable to those obtained after 1000 Sinkhorn iterations. When instabilities become an issue, we couple the warm start approach with our log-domain stabilization. The reduced speed of log-domain computations is largely compensated by the fact that our warm start allows the computation of fewer Sinkhorn iterations for an equivalent or better result. Third, when differentiating (4.15), we consider the initial, warm-started (as opposed to initializing b (0) to 1 NS ) values given to the scaling vectors to be constant and independent of weights and atoms. This amounts to considering a different energy to minimize at each L-BFGS step.

We demonstrate the benefits of the warm start in Figure 4.4. We plot the evolution of the mean Peak SNR (PSNR) of the reconstructions throughout the L-BFGS iterations for different settings for the two datasets used in Section 4.5.4. For these examples, we used the KL loss (since it gave the best reconstructions overall), we did not have to use the log-domain stabilization, and we restarted L-BFGS every 10 iterations. At an equal number of Sinkhorn iterations (L), enabling the warm start always yields better reconstructions after a certain number of iterations. It comes at a small overhead cost in time (around 25%) because the L-BFGS line search routine requires more evaluations at the start. For the example in Figure 4.4a, the computation times are 20 minutes for L = 2, 25 minutes for the warm restart and L = 2, and 15 hours for L = 100. In this particular case, enabling the warm start with two Sinkhorn iterations yields even better results than having 100 Sinkhorn iterations without a warm start and with a 36 gain factor in time. For the second dataset (Figure 4.4b), enabling the warm start does not yield results as good as when running 100 Sinkhorn iterations. However, it would require considerably more than two Sinkhorn iterations, and hence a lot more time, to achieve the same result without it. The computation times in all three cases are similar to the previous example.

Sinkhorn heavyball

As part of a generalization of the Sinkhorn algorithm for solving OT between tensor fields, Peyr é et al. ( 2016) introduced relaxation variables. In the particular case of scalar OT (our framework in the present work), these relaxation variables amount to an averaging step in the Sinkhorn updates; for instance, in the case of the barycenter scaling updates (4.11), (4.13),

ã(l) s = d s Kb (l-1) s , (4.42) a (l) s = a (l-1) s τ ã(l) s 1-τ , b(l) s = P (l) (D, λ) K a (l) s , (4.43) b (l) s = b (l-1) s τ b(l) s 1-τ .
τ = 0 yields the usual Sinkhorn iterations, but it has been shown that negative values of τ produce extrapolation and can lead to a considerable increase in the rate of convergence of the Sinkhorn algorithm (Peyr é et al., 2016, Remark 6). This effect can be thought of in the same way as the heavyball method [START_REF] Zavriev | Heavy-ball method in nonconvex optimization problems[END_REF][START_REF] Nesterov | Lectures on convex optimization[END_REF], often used in optimization problems and dating back to [START_REF] Polyak | Some methods of speeding up the convergence of iteration methods[END_REF], i.e. as the addition of a momentum term (e.g., (a (l-1) s /ã (l) s ) τ , which amounts to τ(u (l-1) s ũ(l) s ) in the log-domain) to the usual Sinkhorn updates. This acceleration scheme can be used within our method by applying an automatic differentiation tool (Theano Development Team, 2016) to the forward Sinkhorn loop yielding the barycenter (shown in Algorithm G.1 in the Appendices) and feeding the gradients to Algorithm 4.2.

Unbalanced

In (4.4), we defined the set of admissible transport plans Π(p, q) as the set of matrices whose marginals are equal to the two input measures, that is, with rows summing to p and columns summing to q. Equivalently, we can reformulate the definition of the approximate Wasserstein distance (4.8) as W γ (p, q) := min

T ∈R N×N + T, C + γH(T ) + ι {p} (T 1 N ) + ι {q} (T 1 N ), (4.44)
where ι is the indicator function defined in (3.17). [START_REF] Chizat | Scaling algorithms for unbalanced optimal transport problems[END_REF] introduce the notion of unbalanced transport problems, wherein this equality constraint between the marginals of the OT plan and the input measures is replaced by some other similarity criterion. Using entropic regularization, they introduce matrix scaling algorithms generalizing the Sinkhorn algorithm to compute, among others, unbalanced barycenters. This generalizes the notion of approximate Wasserstein barycenters that we have focused on thus far. In particular, using the KL divergence between the transport plan's marginals and the input measures allows for less stringent constraints on mass conservation, which can in turn yield barycenters which maintain more of the structure seen in the input measures. This amounts to using the following definition of W γ in the barycenter formulation (4.10):

W γ (p, q) := min T ∈R N×N + T, C + γH(T ) + ρ KL(T 1 N |p) + KL(T 1 N |q) , (4.45)
where ρ > 0 is the parameter determining how far from the balanced OT case we can stray, with ρ = ∞ yielding the usual OT formulation. In this case, the iterative matrix scaling updates (4.12-4.13) read, respectively [START_REF] Chizat | Scaling algorithms for unbalanced optimal transport problems[END_REF], as (4.47) where ã(l) s , b(l)

P (l) (D, λ) =         S s=1 λ s K a (l) s γ ρ+γ         ρ+γ γ , (4.46) a (l) s = ã(l) s ρ ρ+γ , b (l) s = b(l) s ρ ρ+γ ,
s are obtained from the usual Sinkhorn updates as in (4.42), (4.43). Algorithm G.2, given in the Appendices, performs the barycenter computation (forward loop) including both the unbalanced formulation and the acceleration scheme shown in Section 4.4.3. Automatic differentiation can then be performed using an appropriate library (Theano Development Team, 2016) to obtain the dictionary and weights gradients, which can then be plugged into Algorithm 4.2 to obtain a representation relying on unbalanced barycenters.

Applications

Comparison with Wasserstein principal geodesics

As mentioned in Section 4.1.1, an approach to generalize PCA to the set of probability measures on some space, endowed with the Wasserstein distance, has recently been proposed [START_REF] Seguy | Principal geodesic analysis for probability measures under the optimal transport metric[END_REF]. Given a set of input measures, an approximation of their Wasserstein Principal Geodesics (WPGs) can be computed, namely geodesics that pass through their isobarycenter (in the Wasserstein sense) and are close to all input measures. Because of the close link between Wasserstein geodesics and the Wasserstein barycenter, it would stand to reason that the set of barycenters of S = 2 atoms learned using our method could be fairly close to the first WPG. In order to test this, and to compare both approaches, we reproduce the setting of the WPG paper [START_REF] Seguy | Principal geodesic analysis for probability measures under the optimal transport metric[END_REF] experiment on the Modified National Institute of Standards and Technology database (MNIST) within our framework. Figure 4.5: Span of our 2-atom dictionary for weights (1t, t), t ∈ {0, 1 4 , 1 2 , 3 4 , 1}, when trained on images of digit 2.

We first run our method to learn two atoms on samples of 1000 images for each of the first four nonzero digits, with parameters γ = 2.5, L = 30, and compare the geodesic that runs in between the two learned atoms with the first WPG. An example of the former is shown in Figure 4.5. Interestingly, in this case, as with the 3's and 4's, the two appear visually extremely close (see the first columns of Seguy and Cuturi, 2015, Figure 5, for the first WPG). It appears our method can thus capture WPGs. We do not seem to recover the first WPG when running on the dataset made up of 1's, however. This is not unexpected, as several factors can cause the representation we learn to vary from this computation of the first WPG:

• In our case, there is no guarantee the isobarycenter of all input measures lies within the span of the learned dictionary.

• Even when it does, since we minimize a non-convex function, the algorithm might converge toward another local minimum.

• In this experiment, the WPGs are computed using several approximations [START_REF] Seguy | Principal geodesic analysis for probability measures under the optimal transport metric[END_REF], including some for the computation of the geodesics themselves, which we are not required to make in order to learn our representation.

Note that in the case of this particular experiment (on a subsample of MNIST 1's), we tried relaunching our method several times with different random initializations and never observed a span similar to the first WPG computed using these approximations.

Our approach further enables us to combine, in a straightforward way, each of the captured variations when learning more than two atoms. This is illustrated in Figure 4.6, where we run our method with S = 3. Warpings similar to those captured when learning only S = 2 atoms (the appearance of a loop within the 2) are also captured, along with others (shrinking of the vertical size of the digit toward the right). Intermediate values of the weight given to each of the three atoms allow our representation to cover the whole simplex, thus arbitrarily combining any of these captured warpings (e.g., vertically shrinked, loopless 2 in the middle of the bottom row).

Figures similar to Figure

Point spread functions

As with every optical system, observations from astrophysical telescopes suffer from a blurring related to the instrument's optics and various other effects (such as the telescope's jitter for space-based instruments). The blurring function, or PSF, can vary spatially (across the instrument's FOV), temporally and chromatically (with the incoming light's wavelength). In order to reach its scientific goals, ESA's upcoming Euclid space mission [START_REF] Laureijs | Euclid definition study report[END_REF] will need to measure the shape of billions of galaxies extremely accurately, and therefore correcting the PSF effects is of paramount importance. The use of OT for PSF modelling has been investigated by [START_REF] Irace | Motion-based interpolation to estimate spatially variant PSF in positron emission tomography[END_REF] and Ngol è and Starck (2017), both with the aim of capturing the spatial variation of the PSF. For any given position in the FOV, the transformations undergone by the PSF depending on the incoming light's wavelength are also known to contain strong geometrical information, as illustrated in Figure 4.7. It is therefore tempting to express these variations as the intermediary steps in the optimal transportation between the PSFs at the two extreme wavelengths. This succession of intermediary steps, the displacement interpolation (also known as McCann's interpolation McCann, 1997) between two measures, We thus ran our method on a dataset of simulated, Euclid-like PSFs (described in Section 3.3.4 and Ngol è et al., 2015, Section 4.1) at various wavelengths and learned only two atoms. The weights were initialized as a projection of the wavelengths into [0, 1] but allowed to vary. The atoms were initialized without using any prior information as two uniform images with all pixels set at 1/N, N being the number of pixels (in this case 40 2 ). The fitting loss was quadratic, the entropic parameter γ set to a value of 0.5 to allow for sharp reconstructions, and the number of Sinkhorn iterations set at 120, with a heavyball parameter τ = -0.1.

The learned atoms, as well as the actual PSFs at both ends of the spectrum, are shown in Figure 4.9. Our method does indeed learn atoms that are extremely close visually to the two extremal PSFs. The reconstructed PSFs at the same wavelength as those of Figure 4.7 are shown in Figure 4.8 (the corresponding final barycentric weights are shown in Figure 4.11b). This shows that OT, and in particular displacement interpolation, does indeed capture the geometry of the polychromatic transformations undergone by the PSF. On the other hand, when one learns only two components using a PCA, they have no direct interpretation (see Figure 4.10), and the weights given to the second principal component appear to have no direct link to the PSF's wavelength, as shown in Figure 4.11a.

Note that while adding constraints can also make linear generative methods yield two atoms that are visually close to the extreme PSFs, for instance by using NMF instead of PCA (see Figure H.5 in the Appendices), our method yields lower reconstruction error, with an average normalized mean square error of 1.71 × 10 -3 across the whole dataset, as opposed to 2.62 × 10 -3 for NMF. As expected, this difference in reconstruction error is particularly noticeable for datapoints corresponding to wavelengths in the middle of the spectrum, as the NMF reconstruction then simply corresponds to a weighted sum of the two atoms, while our method captures more complex warping between them. This shows that the OT representation allows us to better capture the nonlinear geometrical variations due to the optical characteristics of the telescope.

Cardiac sequences

We tested our dictionary learning algorithm on a reconstructed Magnetic Resonance Imaging (MRI) sequence of a beating heart. The goal was to learn a dictionary of four atoms, representing the key frames of the sequence.

An advantageous side effect of the weights learned by our method lying in the simplex is that it provides a natural way to visualize them: by associating each atom d i with a fiducial position (x i , y i ) ∈ R 2 , each set of weights can be represented as one point placed at the position of the Euclidean barycenter of these positions, with individual weights given to the corresponding atom. Up to rotations and inverse ordering, there are only as many such representations as there are possible orderings of the atoms. In the present case of S = 4, we can further use the fact that any of the four weights λ i is perfectly known through the other three as 1j i λ j . By giving atoms fiducial positions in R 3 and ignoring one of them or, equivalently, assigning it the (0, 0, 0) position, we thus obtain a unique representation of the weights as seen in Figure 4.12. The "barycentric path" (polyline of the barycentric points) is a cycle, which means the algorithm is successful at finding those key frames that, when interpolated, can represent the whole dataset. This is confirmed by the similarity between the reconstructions and the input measures.

For this application, we used 13 frames of 272×240, a regularization γ = 2, and a scale between weights and atoms of ζ = N/(100 * M), N = 272×240, M = 13 frames. Initialization was random for the weights, and constant for the atoms. We used a quadratic loss because it provided the best results in terms of reconstruction and representation. We found 25 iterations for the Sinkhorn algorithm to be a good trade-off between computation time and precision.

Wasserstein faces

It has been shown that images of faces, when properly aligned, span a low-dimensional space that can be obtained via PCA. These principal components, called Eigenfaces, have been used for face recognition [START_REF] Turk | Eigenfaces for Recognition[END_REF]. We show that, with the right setting, our dictionary learning algorithm can produce atoms that can be interpreted more easily than their linear counterparts, and can be used to edit a human face's appearance.

We illustrate this application on the Multimedia Understanding Groups database (MUG) of facial expression [START_REF] Aifanti | The MUG facial expression database[END_REF]. From the raw images of the MUG database, we isolated faces and converted the images to grayscale. The resulting images are in the top rows of Figure 4.13. We can optionally invert the colors and apply a power factor α similarly to a gamma-correction. We used a total of 20 (224 × 224) images of a single person performing five facial expressions and learned dictionaries of five atoms using PCA, NMF, a K-SVD implementation [START_REF] Rubinstein | Efficient implementation of the K-SVD algorithm using batch orthogonal matching pursuit[END_REF], and our proposed method. For the last, we set the number of Sinkhorn iterations to 100 and the maximum number of L-BFGS iterations to 450. The weights were randomly initialized, and the atoms were initialized as constant.

We performed a cross validation using two datasets, four loss functions, four values for α (1, 2.2, 3, 5), and colors either inverted or not. We found that none of the α values we tested gave significantly better results (in terms of reconstruction errors). Interestingly, however, inverting colors improved the result for our method in most cases. We can conclude that when dealing with faces, it is better to transport the thin and dark zones (eyebrows, mouth, creases) than the large and bright ones (cheeks, forehead, chin).

As illustrated by Figure 4.13 (and H.7 in the Appendices), our method reaches similarly successful reconstructions given the low number of atoms, with a slightly higher mean PSNR of 33.8 compared to PSNRs of 33.6, 33.5 and 33.6 for PCA, NMF and K-SVD respectively.

We show in Figure 4.14 (and H.6 in the Appendices) the atoms obtained when using different loss functions. This shows how sensible the learned atoms are to the chosen fitting loss, which highlights the necessity for its careful selection if atoms' interpretability is important for the application at hand.

Finally, we showcase an appealing feature of our method: the atoms that it computes allow for facial editing. We demonstrate this application in Figure 4.15. Starting from the isobarycenter of the atoms, by interpolating weights towards a particular atom, we add some of the corresponding emotion to the face.

Literature learning

We use our algorithm to represent literary work. To this end, we use a bag-of-words representation [START_REF] Salton | Introduction to modern information retrieval[END_REF], where each book is represented by a histogram of its words. In this particular application, the cost matrix C (distance between each word) is computed exhaustively and stored. We use a semantic distance between words. These distances were computed from the Euclidian embedding provided by the GloVe database (Global Vectors for Word Representation, [START_REF] Pennington | Glove: Global Vectors for Word Representation[END_REF].

Our learning algorithm is unsupervised and considers similarity between books based on their lexical fields. Consequently we expect it to sort books by either author, writing style, or genre.

To demonstrate our algorithm's performance, we created a database of 20 books by five different authors.

In order to keep the problem size reasonable we only considered words that are between seven and eight letters long. In our case, it is better to deal with long words because they have a higher chance of holding discriminative information than shorter ones.

The results can be seen in Figure 4.16. Our algorithm is able to group the novels by author, recognizing the proximity of lexical fields across the different books. Atom 0 seems to be representing Charlotte Bront ë's style, atoms 1 and 4 that of Mark Twain, atom 2 that of Arthur Conan Doyle, and atom 3 that of Jane Austen. Charles Dickens appears to share an extended amount of vocabulary with the other authors without it differing enough to be represented by its own atom, like others are. for each loss. We notice that from (a) to (d), the atoms' visual appearance seems to increase even though the reconstruction quality decreases. 4.17: Four different original datapoints (in blue) and their reconstructions (in yellow) from our method in both the balanced (top row) and unbalanced (bottom row) settings. In the balanced case, we see the appearance of spurious modes where there was no mass in the original data or a lack of mass where there was a mode originally (the third example). Conversely, in the unbalanced case, our approach always places mass at the right positions on the grid.

Multimodal distributions

It is a well-known limitation of the regular OT-based Wasserstein barycenters that when there are several distinct areas containing mass, the supports of which are disjoint on the grid, the barycenter operator will still produce barycenters with mass in between them. To illustrate the advantages of using the unbalanced version our method introduced in Section 4.4.4 and the use cases where it might be preferable to do so, we place ourselves in such a setting.

We generate a dataset as follows: A 1D grid is separated into three equal parts, and while the center part is left empty, we place two discretized and truncated 1D Gaussians with the same standard deviation, their mean randomly drawn from every other appropriate position on the grid. We draw 40 such datapoints, yielding several distributions with either one (if the same mean is drawn twice) or two modes in one of the two extreme parts of the grid or one mode in each.

We then run our method in both the balanced and the unbalanced settings. In both cases, γ is set to 7, 100

Sinkhorn iterations are performed, the loss is quadratic, and the learned dictionary is made up of three atoms.

In the unbalanced case, the KL-regularization parameter is set as ρ = 20. 4.17 shows examples of the input data and its reconstructions in both settings. In the unbalanced case, our method always yields the right number of modes in the right parts of the grid. Running our method with balanced Wasserstein barycenters, however, leads to reconstructions featuring mass in parts of the grid where there was none in the original datapoint (the two left-most examples). Parts of the grid where the datapoint featured a mode can also be reconstructed as empty (the third example). Lastly, we observe mass in areas of the grid that were empty for all datapoints (the fourth example).

Conclusion to Chapter 4

This chapter introduces a nonlinear dictionary learning approach that uses OT geometry by fitting data to Wasserstein barycenters of a list of learned atoms. We offer schemes to compute this representation based on the addition of an entropic penalty to the definition of OT distances, as well as several variants and extensions of our method. We illustrate the representation our approach yields on several different applications.

Some very recent works present a faster Sinkhorn routine, such as the Greenkhorn algorithm [START_REF] Altschuler | Near-linear time approximation algorithms for optimal transport via Sinkhorn iteration[END_REF] or a multiscale approach [START_REF] Schmitzer | Stabilized sparse scaling algorithms for entropy regularized transport problems[END_REF]. These could be integrated into our method along with automatic differentiation in order to speed up the algorithm.

Chapter 5 Space telescopes like Euclid are particularly adapted to WL studies because of their small and very stable PSF. However, a space observatory comes with its own complications. In Section 2.4.1 and Chapter 3, for example, we showed the complex profile of a diffraction-limited PSF leads to higher-order effects in its impact on galaxy shape measurement.

Polychromatic PSF field estimation

Another issue that will need to be addressed with Euclid is the chromatic variations of the PSF [START_REF] Cypriano | Cosmic shear requirements on the wavelength dependence of telescope point spread functions[END_REF][START_REF] Eriksen | Implications of a wavelength-dependent PSF for weak lensing measurements[END_REF]. The PSF is not just a function of the position within the focal plane where the objects lie, but also of the wavelength of incoming light. This effect is especially significant in the case of the VIS instrument because of its very wide band. The effective PSF applied to each object is therefore a function of its SED. In order to correctly measure a galaxy's shape, we must find the PSF that corresponds to this specific SED. This means we need to recover chromatic variations of the PSF from stellar observations. This information can then be used to estimate the PSF not just at the position of the galaxy, but also with its own SED.

Note that while the issue we discuss here is the chromatic variation of the Optical PSF, [START_REF] Meyers | Impact of atmospheric chromatic effects on weak lensing measurements[END_REF] showed that seeing was also wavelength-dependent. This means that ground-based PSF can also vary with wavelength. [START_REF] Carlsten | Wavelength-dependent PSFs and their impact on weak lensing measurements[END_REF] study this effect in the case of the HSC survey, and propose a correction scheme to apply to the size of the PSF model. Both of these studies conclude that tnderstanding the chromatic variations of the PSF will also be crucial for WL studies with the upcoming, ground-based LSST.

The main aim of this thesis is the development of non-parametric methods to model the VIS PSF. No existing method (see Section 2.4.3) can recover chromatic variations. In this chapter, we propose the first non-parametric PSF model capable of doing so. We start from the approach proposed in Chapter 3 and Paper II, and expand it using the OT concepts developed in Chapter 4 and Paper I. This work was carried out in collaboration with Jean-Luc Starck, Fred Ngol è, and graduate student Rebeca Araripe, who contributed 119 significantly to improving the method, and to both identifying and addressing some of its limitations during her internship at CEA.

Chromatic variations of the PSF

Overview

We start by describing the formalism of a wavelength-dependent PSF. Following Section 3.3.1, let H denote the true PSF. We now consider it to be a function of both position u and wavelength λ. Consider an object (star or galaxy) i, at position u i and with SED S i . The PSF affecting it is

H i = B S i (λ)H(u i , λ)dλ, (5.1)
where B is the band of the instrument. In our case of Euclid's VIS instrument, we have B := [550, 900]nm. H i is a 2D function of image coordinates, x 1 , x 2 . Using (2.88)'s notations, let I denote the true brightness profile of object i. Its PSF-convolved profile is

I obs (x 1 , x 2 ) = B I(x 1 , x 2 )S i (λ) * H(u i , λ) (x 1 , x 2 )dλ (5.2) = I(x 1 , x 2 ) * B S i (λ) H(u i , λ) (x 1 , x 2 )dλ (5.3) I obs (x 1 , x 2 ) = I(x 1 , x 2 ) * H i (x 1 , x 2 ).
(5.4) (5.4) is the polychromatic (and continuous) equivalent to the general PSF convolution setting of (2.103). All wavelength-dependent quantities are contained in H i . This required, to go from (5.2) to (5.3), the assumption that I does not vary with λ. In the case of an unresolved star,

I(x 1 , x 2 ) := 1 {(x1,x2)=(x c 1 ,x c
2 )} , and this is true. For a galaxy, however, the true brightness profile is likely to be a function of wavelength. For instance, its bulge and disk are likely to have different spectra. In the general case, the effect of a chromatically varying brightness profile, I(x 1 , x 2 , λ) (or, equivalently, of a spatially varying SED S i (λ, x 1 , x 2 )), is called color gradient [START_REF] Semboloni | On the shear estimation bias induced by the spatial variation of colour across galaxy profiles[END_REF]. It can be a significant source of bias in shear measurements. [START_REF] Er | Calibration of colour gradient bias in shear measurement using HST/CANDELS data[END_REF] showed that it is possible to calibrate it to sufficient accuracy for Euclid, using HST data. This correction also requires an accurate knowledge of the PSF chromaticity, which needs to be acquired from stellar images. In this chapter, we focus on this task, and will therefore always assume (5.4) to be a valid assumption. Color gradient correction could then be carried out a posteriori, using our chromatic model as an input.

Similarly to the simplified setting of Section 3.3.1, our aim is to build a PSF model, Ĥ(u gal , S gal ), for any set of galaxy position and SED, (u gal , S gal ). Available observations are star images, Y 1 , . . . , Y n stars , with (5.5) where, as in (3.29), F and N i are the degradation operator (discrete sampling, subpixel shift and further undersampling) and Gaussian noise, respectively. H i ) is the true PSF affecting star i.

Y i := F (H i ) + N i ,
Since we want our PSF model to be computable for any SED S, we will build it as a function of λ. In other words, we want to break down integrated, degraded observations into monochromatic PSF components Ĥ(u, λ) λ

. We can then reconstruct the PSF that affected the object with

Ĥ(u, S) = λ S(λ) Ĥ(u, λ),
(5.6) where the summation is carried out over a discretization of B. This is an ill-posed inverse problem, as infinitely many Ĥ(u i , λ) can reproduce the integrated star observation Y i . The most trivial example is Ĥ(u i , λ) = Hi S(λ) ,

(5.7)

with Hi the average integrated PSF across the whole band B. Such a model would entirely fail at recovering chromatic information. This example shows the complexity of this problem; this is further illustrated in Figure 5.1. Even if we assume the stars' SED to be known (see Section 5.1.2 for a discussion of this issue), the chromatic information is highly degraded by the integration over λ. The only way to recover it is through the use of prior knowledge and regularization, as discussed in Section 3.1.2. We will build these using OT in Section 5.2.

SEDs

Knowledge of both stars' and galaxies' spectra are required. The former to build a chromatic PSF model, the latter to compute it for galaxies using (5.6). Photometric measurements, for each galaxy, from both Euclid's own NISP instrument and supporting ground-based surveys will be made available for photo-z. These can also be used to obtain an estimate of S per object. This, however, raises the concern that the same measurements would be used for both PSF and redshift estimation. This in turn leads to correlations between errors in the two. [START_REF] Eriksen | Implications of a wavelength-dependent PSF for weak lensing measurements[END_REF] explore this issue, and find that existing template-fitting methods would need to be modified to achieve Euclid accuracy goals. They propose a machine learning approach that reaches requirements, and corrects for potential correlations between the integrated galaxy PSF models and estimated redshifts. Interestingly, since their approach allows for a mapping between objects' colors and PSF size that is independent from the main PSF model, it can also be used as an extra validation of the latter. For their approach to be successful in recovering the effective galaxy PSFs (i.e. evaluating Equation 5.6), they do require accurate knowledge of the chromatic variations of the PSF. Similar to color gradient corrections, the model proposed in this chapter would thus be fitted on stellar objects first, then provided as input.

In order to build a polychromatic PSF model, we also require per-object spectral information about stars. [START_REF] Kuntzer | Stellar classification from single-band imaging using machine learning[END_REF] showed that they could successfully classify individual stars into stellar classes using only their observation with VIS. This in turn allows us to obtain at least an SED template per star. More accurate spectral information will also be available for some objects, including from CSS-OS [START_REF] Gong | Cosmology from the Chinese Space Station Optical Survey (CSS-OS)[END_REF] and Gaia [START_REF] Perryman | Gaia: Composition, formation and evolution of the galaxy[END_REF]. In the experiments of Section 5.3, we will only use stellar template SEDs, though we note our proposed model can only be improved by more precise spectral information on the observed stars. It can also, in principle, be fitted using stars with discrete SEDs of various accuracy simultaneously.

In what follows, we will always assume that for each observed star Y i , we also have access to some measurement of its SED, S i . Moreover, in our experiments, the SED associated to each star is always exactly correct; the impact of a misclassification of stellar classes and/or inaccurate SED measurements on our method is left for further study.

λRCA

Rationale

In Section 4.5.2, we showed that the Wasserstein barycenter operator was a good choice to capture the chromatic variations of the VIS PSF. Our proposed polychromatic PSF model, λRCA, uses this information as a prior on the chromatic variations in order to expand the method of Chapter 3. In this model, the PSF was decomposed through the matrix factorization Ĥi := S A i , with S a set of eigenPSFs and A i the weights for observation i. Star images could then be recovered by applying the degradation operator,

Y i ≈ F d (S A i ) = F d          j a i j S j          .
(5.8)

The central idea behind λRCA is to replace the set of eigenPSFs (S j ) j with a set of 2-atoms dictionaries (D j ) j := (d - j , d + j ) j containing, similar to those learned in Section 4.5.2, two extreme wavelengths eigenPSFs. Each monochromatic eigenPSF at any arbitrary wavelength λ can then be recovered as the Wasserstein barycenter of D j with weights T λ := (t λ , 1t λ ), as shown in Figure 4.8. Replacing S j in (5.8), we get

Y i ≈ F d          j a i j λ S i (λ)P(D j , T λ )          = F d          λ S i (λ) j a i j P(D j , T λ )          ,
(5.9) where P is the Wasserstein barycenter operator defined in (4.10). We will discuss the choice of T λ in Section 5.2.3. By learning both D := (D j ) j and A = (A i ) i∈{1,...,n stars } from observed stars, we can then reconstruct the PSF at any position and for any SED. Spatial interpolation is carried out over A in the same way as in RCA (see Section 3.3.3), yielding A gal = (a gal, j ) j . "Spectral interpolation" is performed by using, in (5.6), Ĥ(u gal , λ) := j a gal, j P(D j , T λ ).

(5.10)

Learning D

We have shown in Chapter 4 that the Wasserstein barycenter operator can recover the chromatic variations of the PSF. However, in that experiment, our WDL method was trained on monochromatic PSFs. The learned 5.2. λRCA 123 atoms, d -, d + , were thus extremely close to the true extreme wavelengths PSFs (Figure 4.9). In the real-life setting of Figure 5.1, however, monochromatic PSFs are unavailable. It is therefore impossible to directly apply the idea presented above.

To illustrate this, let us start by simply replacing the eigenPSFs S of RCA by a set of Wasserstein barycenters D, and the observation model (5.8) by (5.9). We would then fit our model by solving a minimization problem similar to (3.36) in the case of RCA, i.e.

min D,A 1 2 Y -F d          λ, j S i (λ)a i j P(D j , T λ )          2 F + g(D, A) ,
(5.11) with g enforcing a set of constraints. If these were chosen to be the same as those of RCA (where applicable, see Section 5.2.4), with no extra constraints on the set of 2-atoms of D, it would lead to convergence toward

∀ j, d - j = d + j = S j ,
(5.12)

where S j is the eigenPSF that would be obtained by running RCA on the same data. Since P((S j , S j ), Λ) = S j for any set of weights Λ, we would revert to the same PSF model as that of monochromatic RCA. This is the exact same degeneracy as that illustrated by (5.7).

We thus need further constraints to ensure our prior knowledge (that the Wasserstein barycenter recovers chromatic variations) is active. We achieve this through two means: an adequate first guess, and a constraint on the spread of the atoms. Both come from the observation that, as λ increases, chromatic variations resemble a "zoom-in", as seen in Figure 4.7.

Since we will obtain our final model by alternate minimization (Section 3.1.6) over D and A, we expect to converge toward a local minimum. By selecting a first guess D (0) motivated by the actual variations in our data, we can influence which local minimum will be reached. We build the first guess atoms, d -

j (0) , d + j (0)
, as follows:

1. we split the available stars into r groups (where r is the number of sets of dictionaries, or polychromatic eigenPSFs); 2. we perform a crude super-resolution step to obtain one superresolved star, Y + j , per group; 3. we apply a zoom-out operation to each Y + j , yielding Y - j ;

4. we set d -

j (0) := Y + j , d + j (0) := Y + j .
We tried several different ways to allocate stars to groups at step 1, and found it to have little influence. In practice, the stars are thus randomly allocated to groups, with replacement, as the number of stars used impacts upon the quality of the superresolution step.

Step 2 was performed using the shift-and-add approach [START_REF] Elad | A fast super-resolution reconstruction algorithm for pure translational motion and common spaceinvariant blur[END_REF]. Lastly, the zoom-out operation of step 3 was carried out using an off-the-shelf method within SciPy1 [START_REF] Jones | SciPy: Open source scientific tools for Python[END_REF]. An example of the resulting first guess atoms is shown in Figure 5.2. We want to ensure the property of d + being more spread out than d -is conserved throughout the iterations.

While we could set one to be the zoom-out of the other at every iteration, and only optimize over the set of (d + j ) j , this would be too stringent a constraint. The true extreme wavelength PSFs clearly exhibit more intricate variations, as can be seen in Figure 4.9. Instead, if we impose the support of d-, the Fourier transform of d -, to be smaller than that of d + , it will lead to the latter being more spread out in direct space. In practice, this is achieved through the addition of the following spread constraint:

where β spread is a trade-off parameter weighing the relative importance of this constraint compared to others and to the data fidelity term (similar to λ in Equation 3.11), and w spread j are weights that determine the amount of sparsity desired.

These are two new hyperparameters that could in principle be set to any value. We can, however, provide the following empirical considerations. In practice, it is beneficial to have β spread vanish with increasing iterations. Indeed, as D approaches convergence, the spread constraint becomes less needed. Lowering its relative importance further allows for our final dto include low-frequency variations that would have otherwise been removed by thresholding. Since we want the Fourier transform of dto be sparser than that of d+ , w spread j should be related to d+ 1 . We found

w spread j := 1 2p 2 d+ 1 , (5.14)
where p 2 is the number of pixels in the superresolved PSF images, to work well in practice for the VIS PSF. The amount of extra spread of the largest wavelength PSF, when comparing it to the smallest, is related to how the size of the PSF changes with wavelength. This relationship is often modelled as a power law. It is reasonable to assume that some knowledge about its parameter should be available for any instrument's PSF (see, e.g. [START_REF] Carlsten | Wavelength-dependent PSFs and their impact on weak lensing measurements[END_REF][START_REF] Eriksen | Implications of a wavelength-dependent PSF for weak lensing measurements[END_REF], for that of HSC and VIS, respectively), in turn giving an empirical mean to select w spread j for any survey. We note that both of these choices lead to a change in the cost function that is minimized. However, since fitting λRCA amounts to an alternated minimization, this is acceptable as long as overall convergence is achieved in practice. Indeed, each minimization over D is already carried out with a different cost function regardless, since A is updated in between each of them.

Choosing t λ

The other new parameters arising from the introduction of OT in our PSF modelling are the barycentric weights, T λ (that were called Λ in the generic case of Chapter 4). Since we only consider 2-atoms dictionaries in the present chapter, there is only one scalar paramater, t λ , to choose. The other barycentric weight will then necessarily be 1t λ . t λ corresponds to the relative weight given to d -(compared to d + ) at any wavelength λ.

For the extreme wavelengths of our band B, the choice is naturally t λ min := 1, t λ max := 0.

(5.15) For all intermediary wavelengths, t λ can either be added as a free parameter to optimize over when fitting λRCA to stars, or as a predetermined function of λ.

The second option is preferable as it reduces the number of free parameters. Our experiment of Section 4.5.2 provided us with some early insight into the relationship between λ and the Wasserstein barycentric weights between two "extreme wavelength" atoms. There, t λ was initialized as a projection of B = [λ min , λ max ] into [0, 1]. While still allowed to vary, it remained fairly close to linear upon convergence of WDL, as shown in Figure 4.11b. The present setting is different, since we are not running WDL on a set of true monochromatic PSFs, though this result is an indication that a linear relationship between λ and t λ might be a good choice.

If our model succeeds at capturing chromatic variations, our set of polychromatic eigenPSFs should reproduce the true extreme wavelength PSFs, H ext (u) := (H(u, λ min ), H(u, λ max )). To explore the relationship between λ and an optimal t λ , we thus compute a set of Wasserstein barycenters, P t (u) := P(H ext (u), (t, 1t)),

(5.16) on a finely sampled grid t ∈ [0, 1], for 10 different positions u in the FOV. For each intermediary wavelength λ, we select the optimal t as

t * λ (u) := argmin t H(u, λ) -P t (u) 2 F .
(5.17)

That is, the barycenter of the true extreme wavelength PSFs that achieves the lowest pixel reconstruction error when compared with the true monochromatic PSF. These are plotted in Figure 5.3, and show excellent agreement with a linear relationship. We will therefore always set t λ := λλ min λ max -λ min (5.18) for all components j.

Other constraints and optimization problem

Now that we have addressed the new variables and parameters of λRCA, we turn to the rest of the constraints of RCA described in Section 3.3.2. The "low rank", or dimensionality reduction aspect is preserved through the choice of r, the number of components. The only difference is these are now a set of dictionaries (D j ), instead of a set of single eigenPSF images (S j ) j . Similarly, we still want to enforce sparsity of these components in an appropriate representation space (Starlets, in our case). This is achieved by preserving the sparsity constraint, but applying it to both elements of each D j instead of S j .

The graph constraint described in Sections 3.3.2 and 3.3.3 is directly applicable to λRCA and remains unchanged. We build the set of PSF graphs at initialization as in (3.33), factorize A by the last few eigenvectors of their "Laplacian matrices", and optimize over the resulting α coefficients instead of A. The graph constraint is still enforced through a ι Ω term in the cost function, with Ω defined in (3.38).

As was the case for the dictionary of WDL in Section 4.2, we will now require all (d + j , d - j ) to belong to the probability simplex Σ p 2 , defined in (4.1). This can be achieved by two means: either using the logistic change of variable (as we did in Chapter 4), or by adding ι Σ p 2 terms for each d + j and d - j to our cost function. Note that Σ p 2 is a convex set, and ι Σ p 2 is thus proximable. The experiments shown in this chapter used the latter option. Either way, a side effect is that all elements of D are positive. This does not guarantee the positivity of the reconstructed PSFs, as A can still contain negative values. However, in practice, we found that the new simplex constraint was sufficient to obtain a positive-valued PSF model. We thus remove the positivity constraint that was present in regular RCA (enforced through the ι + (S αV T ) term in Equation 3.36). Note that a similar observation was already made in both Ngol è et al. ( 2016) and Section 3.3: when performing the alternated optimization of RCA, it was sufficient to consider the positivity constraint when optimizing over S . It was already discarded when optimizing over α.

Altogether, these considerations give the following optimization problem:

min D,α 1 2 Y -F d          λ, j S i (λ)a i j P (L) (D j , T λ )          2 F + r j=1 w - j Φd - j 1 + w + j Φd + j 1 + j ι Σ p 2 (d + j ) + ι Σ p 2 (d - j ) + g spread (D) (5.19) + ι Ω (α) .
The first line is the data fidelity term. The second contains all constraints applied to D: sparsity in Starlet domain, need to belong to the simplex, and spread constraint (defined in Equation 5.13). The third is the graph constraint applied to α.

Notice we replaced the Wasserstein barycenter operator P with its entropy penalized approximation P (L) , as in Section 4.2.2. As in the WDL method of Chapter 4, this will allow us to compute the gradient of our cost function with regard to D through automatic differentiation.

As with regular RCA, fitting λRCA to a star field amounts to solving (5.19). This is achieved through alternatively optimizing over D and α using proximal algorithms [START_REF] Condat | A primal-dual splitting method for convex optimization involving Lipschitzian, proximable and linear composite terms[END_REF][START_REF] Raguet | A generalized forward-backward splitting[END_REF]. A python library to perform this fitting is currently under development2 . It includes a wrapper of C functions3 , originally developed by my collaborator Matthieu Heitz for the log-stabilized implementation of WDL described in Section 4.4.1, heavily modified by Rebeca Araripe to fit the needs of λRCA.

Experiments

In order to test our proposed approach, we compare its performance with that of regular RCA on the experiment described in this section. The PSFs used as ground truth are the same VIS simulations as those used in Section 3.3 and the PSF experiment of Section 4.5.2, described in more detail in Ngol è et al. (2015). Future experiments in the nonparametric Euclid PSF modelling efforts will, however, use a new set of simulations provided by Pierre-Antoine Frugier. These were custom made for this purpose, are based on more up-to-date specifications of the flight instrument, include modelling of polishing errors that lead to high-frequency variation, and the impact of CCD misalignment. Because of this last addition, the underlying PSF model is discontinuous at the border of each CCD. Conversely, no CCD misalignment is present in the dataset used in this thesis. The experimental set-up of Section 3.3 used n stars = 300, which is higher than the expected number of usable PSF stars per CCD, but lower than the number across the whole field. In preparation for the new dataset, and future efforts to add multi-CCD handling to our non-parametric models, we will use n stars = 80 in the present chapter. This number corresponds to the average expected number of PSF stars, per VIS CCD, on science exposures.

For each position considered, we save a set of "true" PSFs, (H(u, λ)) λ , sampled at the target pixel scale. As in Section 3.3, that target is half of Euclid's detector pixel scale. Resulting PSF images are then truncated to stamps of 42×42 pixels. These correspond, similar to H kn in Chapter 3, to the best reconstruction achievable by our models, and will be used for comparison and to compute PSF model quality criteria. The PSF simulations contain 100 monochromatic PSFs, with a spectral sampling of ∆λ = 5nm. These, however, contain some out-ofband simulations that we will not consider in the present work. Restraining ourselves to the nominal VIS band of B = [λ min , λ max ] = [550, 900]nm, we obtain 71 monochromatic PSFs per position.

Observed stars

80 positions U stars are randomly drawn across the FOV. One of 13 stellar SED is assigned to each of these.

Following [START_REF] Kuntzer | Stellar classification from single-band imaging using machine learning[END_REF], these are chosen to be templates of main sequence stars, spanning the whole Morgan-Keenan range [START_REF] Morgan | Spectral classification[END_REF]

Test/galaxy PSFs

PSF models

We run both RCA and λRCA on the observed stars. Since RCA does not handle chromatic variations, its PSF model is simply interpolated to each galaxy position in U gal , yielding 80 different ĤRCA estimated PSF. Each will be used to compute diagnostics by comparing it with each of the 31 different integrated test PSFs corresponding to different SEDs.

λRCA uses the true individual stellar SEDs, (S i ) i , along with the corresponding observed stars and positions, (Y i , u i ) i , as inputs. The spectral sampling rate ∆λ of these is the same as that of our simulated PSFs.

However, in a real-life setting, this sampling rate would depend on the source of our SED information. The number of individual wavelengths at which the Wasserstein barycenters of each of our D j are computed is another free parameter. In other words, this parameter determines the set over which the summation in λ is carried out in (5.9). The higher this number is, the more chromatic information is used, up to the limit imposed by the quality of our SED estimates. However, it also comes at increasingly higher computational costs. In the results

shown in this chapter, we chose to compute barycenters at 12 different, evenly spaced individual wavelengths.

This value was chosen because of the small improvement in reconstruction error obtained when adding extra wavelengths values.

For both methods, we learn r = 4 components. These are either eigenPSFs S j for RCA, or 2-atoms dictionaries D j for λRCA. Other hyperparameters are set as suggested in Chapter 3 and Section 5.2. The addition of the entropic penalty in the computation of the Wasserstein barycenter operator in (5.19) adds γ and L as hyperparameters to λRCA. These are the entropic penalty trade-off parameter and number of Sinkhorn iterations, respectively. The role of these two is described in Chapter 4, with a graphical representation of the influence of γ in Figure 4.3.

Once again, empirical ways to determine adequate values for these two parameters can easily be proposed.

While high γ values can lead to a denoising effect [START_REF] Cuturi | A smoothed dual approach for variational Wasserstein problems[END_REF], in our case, the noise is already handled by the sparsity constraint. On the other hand, we want our PSF model to recover sharp features, which requires low values of γ. The exact value can be chosen empirically by computing Wasserstein barycenters of images expected to contain features of the same sharpness as the desired PSF model, and ensuring these are preserved within the barycenters. In our case, γ could be chosen by computing Wasserstein barycenters of the first guess, lowest wavelengths dictionary atoms, (d - j ) (0) , and ensuring they do not exhibit excessive smoothing. Once γ is chosen, L should simply be chosen to be the smallest possible, while still allowing for convergent Sinkhorn iterations. In our case, these empirical recipes led to our choosing γ = 0.3 and L = 10. These values caused a need for the log-domain stabilization of Sinkhorn iterations we introduced in Section 4.4.1.

Every element of D upon convergence of the λRCA fitting process are shown in Figure 5.8. The features they exhibit clearly show that the algorithm was successful in capturing chromatic variations. We emphasize that, unlike the experiment of Section 4.5.2, these atoms were obtained using only undersampled, single-band images of stars, like those shown in Figure 5.5.

Results

Monochromatic PSFs

We first study the recovery of individual monochromatic PSFs by λRCA. No comparison with RCA (or any other non-parametric PSF model) is possible at this stage, since λRCA is the only one able to recover these.

Test PSFs

In this section, we compare the quality of estimated galaxy PSFs. A visual example is shown for both PSF models in Figure 5.11. We further compute a set of quality criteria, for each group of galaxy SED templates, and show the results in Table 5.1. These include the pixel MSE, normalized by the l 2 norm of the true integrated test PSFs, as well as RMS errors on both ellipticity components and size. As discussed in Section 2.4.1, these are the quantities used by [START_REF] Cropper | Defining a weak lensing experiment in space[END_REF] to set requirements on PSF model quality for given WL science objectives, and was in turn used to set those for Euclid. Our experiments of Chapter 3 showed that the [START_REF] Paulin-Henriksson | Point spread function calibration requirements for dark energy from cosmic shear[END_REF] formalism, which led to the choice of these quantities, is no longer valid for a diffraction-limited PSF. Nonetheless, it remains a useful quantification of a PSF model quality and allows for comparison with the only currently established Euclid requirements. Most importantly, even if our results showed these are not the only PSF quantities having an impact on shear estimation, they still remain among the most important contributors.

As can be seen in Figures I.2 and I.3 of the Appendices, the SED for Starburst galaxies can vary significantly from one template to the next, especially at higher redshifts. We thus split them into two groups with similar trends in high-redshift SEDs in Table 5.1. Using λRCA leads to smaller errors in pixels (as could be seen in the example of Figure 5.11c) across all types of galaxies. The error on the size of the integrated galaxy PSFs is also improved, by over a factor of 2, compared to the case where chromatic variations are not accounted for. In both cases, the amplitude of errors in the RCA model vary by over 20% from one galaxy group to another, while λRCA errors show less variations.

Looking at the RMS on ellipticity, however, we see no significant difference in performance in the second component, while λRCA actually performs slightly worse than RCA in the first component. A possibility is that this is due to λRCA being less efficient in capturing the spatial variations in e 1 . Indeed, the graph constraint is built using the positions of stars, regardless of their SEDs. In the case of λRCA, this leads to a mixing between recovered chromatic and spatial information. If the former has more of an impact on the updates to D across iterations, the spatial information contained in the graph constraint is drowned out as the components "specialize" in capturing the chromatic variations. Conversely, since RCA ignores chromatic information entirely, the graph constraint has a greater impact on updates to the eigenPSFs. If this is indeed the reason for the difference in recovery of the first ellipticity component between the two models, it could be alleviated by learning both chromatic components D j and achromatic eigenPSFs S j simultaneously within λRCA. The former would still capture the chromatic variations, as is clearly the case with the components we found here (as can be seen in Figure 5.8). The latter could then leverage the graph constraint to capture remaining variations driven by the position of objects.

Galaxy type

Discussion

In this chapter, we introduced λRCA, the first non-parametric PSF model capable of capturing chromatic variations. Using no information other than observed undersampled stars and estimates of their SED, we manage to capture the variations undergone by the PSF as the wavelength varies, as illustrated by the appearance of the learned components in Figure 5.8 and the reconstructed monochromatic PSFs at single wavelengths in Figure 5.9. Estimating the PSF that would affect galaxies with a wide range of SEDs and several different redshifts, we see a significant improvement using this proposed approach in both the recovered profile of the PSF and its size. Ignoring the chromatic variations of the PSF naturally leads to a strong correlation between the galaxy type and the PSF modelling errors. Using our chromatic model leads to more stable PSF errors across different galaxy types.

The setting of our experiments in this chapter is more realistic than that of Section 3.3, as it contains polychromatic PSFs and is estimated using the expected number of stars on a single CCD. The quality of our PSF models in terms of ellipticity is of the same order of magnitude as that observed in the previous, monochromatic setting. Interestingly, however, using our chromatic model leads to a worse RMS in the first ellipticity component. This might be alleviated by learning both λ-dependent and achromatic components simultaneously.

Another significant difference with the results of Chapter 3 is in the RMS on the size of the PSF, which is improved by more than an order of magnitude. Using λRCA, we are now at a factor of a few 10 2 over both shape requirements, while in the earlier experiment, we found a factor of about 10 4 in size. This is not only due to the improvement to the PSF model obtained by going from achromatic RCA to λRCA, but also because integrated PSFs naturally have larger profiles, which in turn makes the superresolution easier. Now that we have a PSF model that can capture chromatic variations, the main limitation is the number of datapoints used to fit it. As we already concluded at the end of Chapter 3, our non-parametric approach will only be able to achieve Euclid requirements if we can somehow fit it to more stars simultaneously. A first and fairly straightforward way to do so is to include a modelling of the discontinuities caused by the jump from one CCD to the next in the model. This will allow us to fit it to the whole field simultaneously instead of on a per-CCD basis. As shown in Appendix B, this can already lead to significant improvement of PSF model quality. An approach similar to that used by the LensFit PSF model, described in Equation 2.4.3, could be included into λRCA.

While such an approach could not be tested with the data used in this thesis, the new simulated Euclid PSFs we mentioned in Section 5.3 do contain realistic CCD discontinuities. In the case of VIS, performing cross-CCD fits would already allow for 36 times more stars (on average) to be used. If this still proves insufficient to bridge the gap between the performance showed in this chapter and Euclid requirements, we will need to use stars from several different exposures.

A current caveat of λRCA is its computation time. For the experiment shown in this chapter, fitting the model to a field of 80 stars took a little over an hour on a 4-core computer. The main contribution to computation time is the repeated computations of the Wasserstein barycenter operator, P (L) , and especially of its derivative with regards to the dictionaries. Since we need a very accurate recovery of the PSF profiles, we have to use small values for the entropic regularization parameter γ. This in turn forces us to use the log stabilized version of the backward Sinkhorn loop we presented in Section 4.4.1. Despite our efforts in last chapter to speed up this computation, and our use of a parallelized C code, this step remains the main bottleneck in the fitting of λRCA.

The same was true for our WDL approach, and we suggested some alternatives to speed up the process at the end of Chapter 4, namely the Greenkhorn algorithm [START_REF] Altschuler | Near-linear time approximation algorithms for optimal transport via Sinkhorn iteration[END_REF] and Schmitzer (2019)'s multiscale approach. Another option applicable to λRCA is offered by [START_REF] Courty | Learning Wasserstein embeddings[END_REF]: using deep neural networks, they learn the Wasserstein barycenter operator P. Once such a network is trained, computation of P becomes extremely fast. Moreover, they show these networks are particularly good at generalization; that is, despite being trained using very different data, they still manage to compute excellent approximations of the true Wasserstein barycenters. Including their approach in λRCA could lead to drastic improvements in its computational cost.

Lastly, let us mention a few effects that could have an impact our polychromatic Euclid PSF model. Uncertainty in stellar SEDs was already discussed in Section 5.1.2. Emission lines in galaxy spectra might also lead to large errors in the estimated effective PSF, even if the PSF modelling step presented in this chapter perfectly captured chromatic variations. Out-of-band leakage could also impact the chromatic PSF modelling step.

Most importantly, the central assumption on which λRCA is built is that OT tools are able to capture the true chromatic variations. While we have shown this to be true with the present dataset, very recent measurements made on Euclid hardware indicate the chromatic variations of the PSF may not be quite as smooth as expected.

If non-smooth variations, localized in λ, occur, these would need to be taken into account separately (or on top of) the OT-based recovery of λRCA.

Outlook

Experiments show that our proposed PSF models already outperform the current state-of-the art on simulations. As discussed in Appendix B, however, some technical work remains before these models can reach their full potential within actual data processing pipelines. Similarly, the computational cost of our proposed λRCA approach currently makes its use in processing Euclid data unrealistic. This caveat is mostly related to the computation of OT quantities, however, for which [START_REF] Courty | Learning Wasserstein embeddings[END_REF] recently proposed a workaround.

Incorporating their approach into λRCA should lead to a dramatic decrease in computational overhead.

Beyond these technical improvements, a lot of prospects for the non-parametric PSF models proposed in this thesis could lead to vast improvements. We are presently at a factor of a few hundreds beyond Euclid's stringent requirements. While this may seem like a severe gap, it is important to note that this has been achieved in a fairly pessimistic scenario. Indeed, it was recently pointed out that the simulated PSFs used throughout this thesis correspond to a "toleranced" realization of the telescope model. This means the effects included due to the manufacturing of the instrument are within specifications, but still correspond to a highly perturbed final instrument. The amplitude of the PSF variations occurring within our dataset thus correspond to a highly pessimistic case, and those of the true Euclid flight instrument are likely to be much milder. Moreover, now that we have a model that is capable of capturing chromatic variations, the main limiting factor on its performance is the number of available observations. As discussed at the end of both Chapter 3 and Chapter 5, an immediate mean of improving the quality of a PSF model is to enable it to be fitted to more stars simultaneously.

Our last experiment used only the average number of stars expected, from a single CCD, in a science exposure. As a first mean to increase the number of available stars, we could include a way of handling all CCDs at once. We discussed this prospect in Section 5.5. This straightforward improvement would allow us to use all the stars from any single exposure. Because Euclid's PSF is expected to be, by design, extremely stable, another way of increasing the number of available stars is to use those from several different exposures. The crudest way to do so would be to determine a certain amount of exposures that can be considered to have been affected by the same PSF, and use stars from all of these simultaneously. These could be selected either because they were acquired in short succession, or within similar observing conditions (e.g. with the same solar aspect angle, the main driver for the thermal state of the telescope).

A more involved approach would be to fully account for temporal variations within the PSF modelling. We have already gone from a PSF model that was a function of position, to one that was a function of position and wavelength. We could as well add the time of observation (or some proxy thereof, like measured temperature of the spacecraft) as an extra dimension. Our PSF model could even be updated in an online way, that is, iteratively improved as new exposures are taken. Such an approach would allow for far more datapoints to be used during the fitting. It may even allow us to use the planned calibration fields, some of which will contain a far greater star density than the science exposures of the Wide survey.

This addition of a time dimension to our non-parametric PSF model is the first of three areas where future work in the continuation of this thesis can bring significant improvements. The second is the eventual combination of the approach presented in this thesis with physically-motivated models like that of Duncan et al. (in prep). It is already highly beneficial to have two independent methods to solve a problem that is critical to the success of the Euclid mission. If both end up successful, their combination is likely to lead to an even better PSF model.

A third far-reaching area worth exploring is trying to apply the tools developed in this thesis in wavefront space. Indeed, in the present work, we have only carried out our work in direct space, that is, on images of the PSF itself. Another option is to try and model the wavefront error (WFE) instead of the PSF itself, which could still be done in a non-parametric way. The WFE and resulting direct space PSF are related through the modulus of the Fourier transform. Trying to recover the WFE from direct-space star images thus falls into the field of phase retrieval problems [START_REF] Shechtman | Phase retrieval with application to optical imaging: a contemporary overview[END_REF].

By successfully transferring our method to wavefront space, we would gain access to a wealth of new information. In particular, characterization campaigns led, on the ground, on actual Euclid hardware can provide the impact on the final WFE caused by various components. At the very end of Chapter 5, we briefly mentioned newly found effects causing severe "glitches" (i.e. very strong variations occurring over a very narrow, constant ranges of λ values) in the chromatic variations of the PSF. These glitches could, perhaps, still be captured in direct space using knowledge of their location (in wavelength), for instance by considering λRCA to provide a baseline model, on top of which we would try to capture these extra variations. This task would, however, be made significantly easier if the full WFE maps could be used instead of just the glitches' location. This specific WFE map alone is already a major motivation for further exploration of this avenue. It would also enable us to use every other available source of information about the instrument's WFE, and potentially even the wide corpus of tools adapted for wavefront analysis, like Zernike polynomials [START_REF] Zernike | Beugungstheorie des schneidenver-fahrens und seiner verbesserten form, der phasenkontrastmethode[END_REF]. This avenue for research is thus closely related to that of combining physical and empirical PSF models.

Each of those three ideas are associated with exciting new problems to solve and potential developments to explore. Conversely, there are several other extensions or improvements to the work carried out in this thesis that are more minor and/or less exploratory, some of which we already mentioned:

• technical improvements to both RCA (in order to handle real-data corner cases) and λRCA (to reduce its computational cost);

• handling multiple CCDs simultaneously;

• simultaneously fitting chromatic and achromatic components (see Sections 5.4.2 and 5.5);

• replacing the Starlet transform Φ used in the sparsity constraints by one more adapted to the PSFs we aim to model;

• treating variations of the core and the wings of the PSF separately.

Modelling the Euclid PSF in a non-parametric way is a hard task. A lot of exciting work remains to be carried out, as illustrated by the ideas listed above. The work carried out during my thesis already made it possible to take steps towards a PSF model that is useable for Euclid. Several other useful contributions emanated from this methodological work, both on knowledge about the propagation of PSF errors and in the form of WDL, a generic unsupervised representation learning method. It also allowed me to delve into highly interesting and useful topics, from WL image simulations and galaxy shape measurement to OT. In addition to all the aforementioned PSF modelling-related topics I hope to explore in future work, I believe numerical OT could have several other exciting and beneficial applications in cosmology. As a generic example, Wasserstein barycenters are an excellent tool to interpolate between distributions that vary smoothly with some parameters, but that we can only sample so many times. This type of issue is, of course, ubiquitous in our field. We find that LensFit leads to ρ values that are about an order of magnitude lower than ours. Since the LensFit and PSFEx models are fairly similar (see Section 2.4.3), and both were fitted to the same data, we attribute this improvement to the fact LensFit performs a cross-CCD fit. This fact highlights how a larger number of input stars can significantly increase the quality of a PSF model. Beyond the current study of the CFIS PSF, this result provides a strong motivation for the addition of multi-CCD fitting to RCA and λRCA. Moreover, the bump we observe in ρ 1 at scales of about 10arcmin in Figure B.3 is not present in the LensFIt ρ 1 , and is likely related to CCD jumps.

B.3 Focal plane variations

The ρ statistics probe potential remaining spatially coherent residuals, in our PSF model, across sky positions.

Another common diagnostic of PSF models on real data is to study these residuals as a function of position in the focal plane instead. This is, once again, achieved by measuring shapes of both observed stars and the PSF model estimated at their position, then averaging across a large number of objects. The two ellipticity components and their residuals across the MegaCam mosaic are shown in Figure B.4. Some patterns can be seen in the residuals, although these remain of fairly low amplitude.

Interestingly, even for a ground-based survey like CFIS, this type of diagnostic does not only provide information about potential patterns in the residual, but also about the optical PSF of the instrument. Indeed, as the atmospheric contribution to the PSF at any given position in the focal plane is expected to be largely random, they are cancelled out by averaging across a large number of exposures.

An easily computed byproduct of these diagnostics is the distribution of identified stars as a function of position across the FOV. This is shown in Figure B.5. Some vertical lines with slightly lower star density can be seen, especially close to the CCD borders, though these are not unexpected. "Dark zones" that contain very few stars, however, are clearly present in the four corners of the CCD mosaic, and especially noticeable in the bottom right. These are not present in the LensFit star catalogs, and are thus likely indicative of an issue with Shapepipe's star selection. As of this writing, the exact origin of this issue has not yet been identified, though a working theory is that it might be related to a poor background estimation.

B.4 Conclusion to Appendix B

This appendix presented my main contributions to the ongoing WL processing of CFIS data. We have shown several standard PSF diagnostics used in modern WL surveys. These are performed in addition to more standard checks, such as goodness-of-fit metrics and visual inspection of the residuals of star image after subtraction by the corresponding PSF model. Taken together, these indicate that our PSFEx model is fairly successful in modelling the PSF in the CFIS survey. In particular, Figures B.3 and B.4 seem to indicate we have achieved similar levels of PSF modelling accuracy to those observed in other recent surveys that use PSFEx.

An independent running of the LensFit pipeline on the same data, however, led to a PSF model that outperforms PSFEx in terms of ρ statistics. This is likely due to LensFit's PSF model being fitted to the whole exposure simultaneously, rather than CCD-by-CCD.

Our proposed RCA approach, described in Chapter 3, will soon achieve the necessary code maturity to be successfully applied to these data. The diagnostics shown in this chapter can then be directly computed, and we will be able to compare its performance to PSFEx not just on simulations, but also on real data. As for s = i, we have Φ i (b, D, λ) = Ψ(b, D, λ) FOV field of view.

K d i Kb i =⇒ ∂Φ i ∂d i (b, D, λ) = ∆ 1 N ϕ(b 1 , d 1 ) ∂ D Ψ(b, D, λ) - ∆(Ψ(b, D, λ)) ∆(ϕ i (b i , d i ) 2 ) ∂ d i ϕ(b i , d i ) = ∆ 1 N ϕ(b 1 , d 1 ) ∂ D Ψ(b, D, λ) - ∆(Φ i (b, D, λ)) ∆(ϕ(b i , d i )) K 1 N Kb i = (λ i -1) ∆(Φ i (b, D, λ)) ∆(ϕ(b i , d i )) K ∆ 1 N Kb i .
FWHM full width at half-maximum.

GaBoDS Garching-Bonn Deep Survey.

GEMS Galaxy Evolution From Morphology And SEDs.

GR General Relativity.

GREAT GRavitational lEnsing Accuracy Testing.

HSC Hyper Suprime-Cam.

HSM Hirata-Seljak-Mandelbaum.

HST Hubble Space Telescope. Abstract: As light propagates through the Universe, its path is altered by the presence of massive objects. This causes a distortion of the images of distant galaxies. Measuring this effect, called weak gravitational lensing, allows us to probe the large scale structure of the Universe. This makes it a powerful source of cosmological insight, and can in particular be used to study the distribution of dark matter and the nature of Dark Energy. The European Space Agency's upcoming Euclid mission is a spaceborne telescope with weak lensing as one of its primary science objectives. It is expected to launch in 2022. In practice, the weak lensing signal is recovered from the measurement of the shapes of galaxies. The images obtained by any optical instrument are altered by its Point Spread Function (PSF), caused by various effects: diffraction, imperfect optics, atmospheric turbulence (for ground-based telescopes). . . Since the PSF also alters galaxy shapes, it is crucial to correct for it when performing weak lensing measurements. This, in turn, requires precise knowledge of the PSF itself. The PSF varies depending on the position of objects within the instrument's focal plane. Unresolved stars in the field provide a measurement of the PSF at given positions, from which a PSF model can be built. In the case of Euclid, star images will suffer from undersampling. The PSF model will thus need to perform a super-resolution step. In addition, because of the very wide band of its visible instrument, variations of the PSF with the wavelength of incoming light will also need to be accounted for. The main contribution of this thesis is the building of novel PSF modelling approaches. These rely on sparsity and numerical optimal transport. The latter enables us to propose the first method capable of building a polychromatic PSF model, using no information other than undersampled star images, their position and spectra. We also study the propagation of errors in the PSF to the measurement of galaxy shapes.

KiDS

  standard cosmological model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.1 General Relativity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.2 The isotropic, homogeneous Universe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.3 Redshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.4 Structure formation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.5 The ΛCDM Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Gravitational lensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 Propagation of light through an in inhomogeneous Universe . . . . . . . . . . . . . . . . . 17 2.2.2 Shear and convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.3 Relation to cosmology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2.4 Cosmic shear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 Practical weak lensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.3.1 Image "preprocessing" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.3.2 Masking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.3.3 Object detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.4 (De)blending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.5 Star-galaxy separation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.6 PSF modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.3.7 Galaxy shape measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.3.8 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.3.9 Obtaining redshift information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.4 Point Spread Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 2.4.1 Impact of PSF modelling on shear measurements . . . . . . . . . . . . . . . . . . . . . . . 41 2.4.2 Real data diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.4.3 Past and current PSF models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.5 Euclid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Figure 2 . 1 :

 21 Figure 2.1: An overview of the cosmic history of our Universe. Credit: European Space Agency (ESA), C. Carreau

Figure 2

 2 Figure 2.2: Schematic representation of the expansion of the Universe.

Figure 2 . 3 :

 23 Figure 2.3: Einstein ring LRG 3-757 observed by the Hubble Space Telescope (HST). Credit: ESA/Hubble & NASA.

Figure 2 . 4 :

 24 Figure 2.4: Schematic representation of the quantities of interest in the study of two light rays through an inhomogeneous Universe. The observer is at the black dot on the left. The black screen is perpendicular to the fiducial ray at an arbitrary λ 1 , and the 2D separation ξ(λ 1 , θ θ θ), in red, lies within it.

Figure 2 . 5 :

 25 Figure 2.5: Illustration of the application of various shears. Each ellipse is a sheared version of the circular object at (0, 0), shown at the position corresponding to the shear that was applied to it. Credit: Image from Kilbinger (2015), reproduced with permission.

  the associated WL products had not yet been released.

Figure 2

 2 Figure 2.6: Stacking-induced discontinuities in the PSF. Each combination of two same-colored rectangles corresponds to one MegaCam pointing; the scattered objects in the middle are those detected on a single "tile", that is, a stacked image using those pointings. The color of each object corresponds to a unique combination of contributing pointings, which in turn implies the application of a different (stacked) PSF.

Figure 2

 2 Figure 2.7: The size-magnitude diagram for a single CCD from the CFIS survey. Each scattered point is a detected object; those within the identified stellar locus are shown in orange. Both size, measured through the full width at half-maximum (FWHM), and magnitude are from SExtractor. Credit: A. Guinot.

Figure 2 . 8 :

 28 Figure 2.8: "Euclidization" of a COSmic evOlution Survey (COSMOS) galaxy. The galaxy, as observed by HST, is shown on the left; its reprocessed version, as it would appear if observed by VIS, on the right.

  Figure 2.9: Illustration of the imaging process on a galaxy (top left) and a point source (bottom left). Both undergo convolution by the PSF (center), and are then sampled on a finite number of pixels (right).

Figure 2 .

 2 Figure 2.10: Cartoon representation of the PSF field estimation problem. Stars, indicated in magenta, provide a measurement of the PSF, that must then be used to determine the PSF at the position of the galaxies, in cyan.

Figure 2 .

 2 Figure 2.11: Aperture mass measurements from the VIRMOS-DESCART survey. Top: original processing. Bottom: reanalysis, including a corrected PSF model. Credit: Image from Van Waerbeke et al. (2005), reproduced with permission.

Figure 2

 2 Figure 2.13: Illustration of intra-pixel shifts. The same PSF, H, is sampled on two different pixel grids, indicated by the dotted white and dashed pink lines. Application of the degradation operator, F d , yields two different observations at detector pixel scale, Y 1 and Y 2 . Despite their coming from the same object H, and being shown in postage stamps of the same size, they appear very different because their respective centroids fall at different positions with regard to, say, the central pixel of the stamp. Any PSF modelling approach based on star observations must account for this effect through the use of intra-pixel shifts.

Figure 2 .

 2 Figure 2.14: Full-sky map showing the Euclid Wide Survey (contoured in blue), and the main excluded zones: galactic and ecliptic planes. The LMC, at the bottom-left of the southern extragalactic region, is also excluded. Credit: Jean-Charles Cuillandre.

Figure 2 .

 2 Figure 2.15: Schematic view of the VIS focal plane. Each almost-square region corresponds to one of the 36

  ) (Paper II hereafter). They are the result of work done in collaboration with Jean-Luc Starck and Fred Ngol è, and that benefited from numerous comments from EC members, especially Lance Miller, Christopher Duncan, Henk Hoekstra, Peter Schneider and several of the other authors of Paper II; a complete list is given in Appendix A.

  (Real part of) signals in the Fourier domain.

Figure 3

 3 Figure 3.1: Toy example of signals with a sparse representation.

Figure 3 . 2 :

 32 Figure 3.2: Example image (left) and its Starlet decomposition. The wavelet coefficient at each successive scale j ≤ 5 is an image, of the same size as the original, that captures decreasingly finer variations. The "coarse scale", at the bottom right, contains the remaining information that is, by construction, a smooth approximation of the input image.

fFigure 3

 3 Figure 3.3: Illustration of gradient descent methods. The grey dotted lines denote isolines of the objective function, E = f , and the black star its global minimum. The first two iterations (3.13) are shown, for an appropriate step size α (in purple) and one that is too large and leads to oscillations around the objective (in red).

Figure 3 . 4 :

 34 Figure 3.4: Hard-and soft-thresholding operators, for a given λ parameter.

Figure 3 . 5 :

 35 Figure 3.5: Illustration of the first two forward-backward splitting iterations, for E = f +ι C , where f is the same as in Figure 3.3. The dotted arrows denote the forward step, corresponding to a gradient descent iteration (3.13), and the dashed arrows to the application of prox ι C .

Figure 3

 3 Figure 3.6: An example unweighted graph.

Figure 3

 3 Figure 3.7: RCA's matrix factorization.

Overview

  RCA[START_REF] Ngol È | Constraint matrix factorization for space variant PSFs field restoration[END_REF], like many other methods (including PSFEx, as shown in Equation2.4.3), achieves super-resolution through matrix factorization. The PSF at the position u i of each star is reconstructed through a linear combination of a set of eigenPSFs, S j :

Figure 3 . 8 :

 38 Figure 3.8: Matrices involved in the spatial constraint.

Figure 3

 3 Figure 3.3.4. Because of the upsampling, the resulting PSFs will be stored in stamps of 42 × 42 pixels.

Figure 3 .

 3 Figure 3.10: Visual examples of the simulated Euclid PSF in the natural (top row) and logarithmic (bottom row) domains, at the original pixel sampling of the simulation (about 12 times finer than Euclid). Each stamp is approximately 4.25 arcsecond across.

  Figure 3.11: Example observed (undersampled) star stamps, at the various noise levels considered, from which the PSF models will be estimated. Each stamp is approximately 2.1 arcsecond across.

Figure 3

 3 Figure 3.12: Examples from the three sets of estimated PSFs described in Section 3.3.4. Each stamp is approximately 2.1 arcsecond across. Note that the only difference between (a) and (b) is the color map, matched to be the same as that of ĤRCA and ĤPSFEx estimated from stars with SNR 10 and 50, respectively.

Figure 3

 3 Figure 3.14: PSF ellipticity residuals as a function of position, for both PSF models. Left: RCA; right: PSFEx.

Figure 3 .

 3 Figure 3.16: RMS error on each PSF ellipticity component for the two models, as a function of input star SNR. Continuous lines are for the first ellipticity component, dashed for the second.

Figure 3 .

 3 Figure 3.17: Average pixel error as a function of star SNR.

Figure 3

 3 Figure 3.19: 2D density of true and measured shear; the colours correspond to the number of occurrences of measured shear values when using the "known" PSF, each from approximatively 10 000 galaxies, for the corresponding input shear. The line shows the best fit linear regression, yielding the bias values. Shapes were measured with KSB.

Figure 3 .

 3 Figure 3.20: Similar to Figure 3.19, 2D density of true and measured shear, using the PSF models for the latter.

Figure 3 .

 3 Figure 3.21: KSB-induced multiplicative shear bias m as a function of the SNR of stars on which the PSF models were fitted. Straight lines correspond to the first component, dashed lines to the second.

Figure 3 .

 3 Figure 3.22: Same as Figure 3.21, for additive bias c.

Figure 3 .

 3 Figure 3.23: Same as Figure 3.20, when shape measurement is performed using model-fitting.

  Figure 3.24: Multiplicative bias induced by the PSF models, as predicted from (2.110) (continuous line and error bars) and observed when measuring galaxy shapes with KSB (empty points) or im3shape (filled points).

  (a) First ellipticity component. (b) Second ellipticity component.

Figure 3 .

 3 Figure 3.25: Similar to Figure 3.24, for the additive biases predicted from (2.111) (continuous line and error bars), and those observed with KSB (empty points) and im3shape (filled points). Note that in this case, the analytical predictions are different for each ellipticity component because of the left-hand term in (2.111).

Figure 3 .

 3 Figure 3.26: Same as Figure 3.24, when PSFs and galaxies are Gaussian.

  (a) First ellipticity component. (b) Second ellipticity component.

Figure 3 .

 3 Figure 3.27: Same as Figure 3.25, when PSFs and galaxies are Gaussian.

Figure 4 . 1 :

 41 Figure 4.1: Graphical representation of the mass transportation problem. The minimal effort cost to transport one measure into the other defines the OT distance between µ and ν.

Figure 4 . 2 :

 42 Figure 4.2: Top row: data points. Bottom three rows: On the far sides, in purple, are the two atoms learned by PCA, NMF and our method (WDL), respectively. In between the two atoms are the reconstructions of the five datapoints for each method. The latter two were relaunched a few times with randomized initializations and the best local minimum was kept. As discussed in Section 4.2, the addition of an entropy penalty to the usual OT program causes a blur in the reconstructions. When the parameter associated with the entropy is high, our method yields atoms that are sharper than the dataset on which it was trained, as is observed here where the atoms are Dirac despite the dataset consisting of discretized Gaussians. See Section 4.4.1 for a method to reach arbitrarily low values of the entropy parameter and counteract the blurring effect.

Figure 4 . 3 :

 43 Figure 4.3: Wasserstein simplices: barycenters of the three images in the corners with varying barycentric weights. Middle row: λ= 1 2 , 1 2 , 0 , 1 3 , 1 3 , 1 3 , 0, 1 2 , 1

  λ i ), x i ) .

( 4

 4 .26) Algorithm 4.2: Quasi-Newton implementation of the WDL algorithm.

  stabilize the computation and avoid reaching representation limits, we transfer it to the log-domain (v := log(b)). Moreover, we shift the input values by their maximum and add it at the end. The final process can be written as the operator K LS : log(b) → log(K(b)) with K a separable kernel, and is described in Algorithm 4.3. Algorithm 4.3: LogSeparableKer K LS : Application of a 2D separable kernel in log-domain.

  (a) MUG dataset: woman (b) MUG dataset: man

Figure 4 . 4 :

 44 Figure 4.4: Evolution of the mean PSNR of the reconstructions per L-BFGS iteration, for three configurations, on two datasets. The KL loss was used for this experiment. We see that the warm start yields better reconstructions with the same number of Sinkhorn iterations (L) in roughly the same time.

  Figures similar toFigure4.5 and 4.6 for all other digits are given in the Appendices, Section H.1.

Figure 4 . 6 :

 46 Figure 4.6: Span of a 3-atom dictionary learned on a set of 2's. Weights along each edge are the same as in Figure 4.5 for the two extreme vertices and 0 for the other, while the three center barycenters have a weight of 1 2 for the atom corresponding to the closest vertex and 1 4 for each of the other two.

Figure 4 .

 4 Figure 4.7: Simulated Euclid-like PSF variation at a fixed position in the FOV for varying incoming wavelengths.

Figure 4 . 8 :

 48 Figure 4.8: Polychromatic variations of PSFs by displacement interpolation.

Figure 4 . 9 :

 49 Figure 4.9: Extreme wavelength PSFs in the dataset and the atoms making up the learned dictionary.

Figure 4 .

 4 Figure 4.10: PCA-learned components.

  (a) Weights for the first two principal components learned by PCA. (b) Barycentric weights learned by our method. The dashed lines are the initialization.

Figure 4 .

 4 Figure 4.11: Evolution of representation coefficients by wavelength.

Figure 4 .

 4 Figure 4.12: Left: Comparison between four frames (out of 13) of the measures (lower row) and the same reconstructed frames (upper row). Right: plot of the reconstructed frames (blue points) by their barycentric coordinates in the 4-atom basis, with each atom (red points) at the vertices of the tetrahedra. The green point is the first frame.

Figure 4 .

 4 Figure 4.13: We compare our method with Eigenfaces[START_REF] Turk | Eigenfaces for Recognition[END_REF], NMF and K-SVD[START_REF] Rubinstein | Efficient implementation of the K-SVD algorithm using batch orthogonal matching pursuit[END_REF] as a tool to represent faces on a low-dimensional space. Given a dataset of 20 images of the same person from the MUG[START_REF] Aifanti | The MUG facial expression database[END_REF] performing five facial expressions four times (row (a) illustrates each expression), we project the dataset on the first five Eigenfaces (row (b)). The reconstructed faces corresponding to the highlighted input images are shown in row (f). Rows (c) and(d), respectively, show atoms obtained using NMF and K-SVD and rows (g) and (h) their respective reconstructions. Using our method, we obtain five atoms shown in row (e) that produce the reconstructions in row (i).

Figure 4 .

 4 Figure 4.14: We compare the atoms (columns 1 to 5) obtained using different loss functions, ordered by the fidelity of the reconstructions to the input measures (using the mean PSNR), from best to worst: the KL divergence (a) PS NR = 32.03, the quadratic loss (b) PS NR = 31.93, the total variation loss (c) PS NR = 31.41, and the Wasserstein loss (d) PS NR = 30.33. In the last column, we show the reconstruction of the same input image

Figure 4 .

 4 Figure 4.15: Face editing : Using the atoms shown in row (a) of Figure H.6, we interpolate between the atoms' isobarycenter (top image) and each one of the atoms (giving it a relative contribution of 70%). This allows us to emphasize each emotion (bottom images) when starting from a neutral face.

Figure

  Figure 4.17: Four different original datapoints (in blue) and their reconstructions (in yellow) from our method in both the balanced (top row) and unbalanced (bottom row) settings. In the balanced case, we see the appearance of spurious modes where there was no mass in the original data or a lack of mass where there was a mode originally (the third example). Conversely, in the unbalanced case, our approach always places mass at the right positions on the grid.

Figure

  Figure 4.17 shows examples of the input data and its reconstructions in both settings. In the unbalanced case, our method always yields the right number of modes in the right parts of the grid. Running our method with balanced Wasserstein barycenters, however, leads to reconstructions featuring mass in parts of the grid where there was none in the original datapoint (the two left-most examples). Parts of the grid where the datapoint featured a mode can also be reconstructed as empty (the third example). Lastly, we observe mass in areas of the grid that were empty for all datapoints (the fourth example).

  variations of the PSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.1.2 SEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.2 λRCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.2.1 Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.2.2 Learning D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.2.3 Choosing t λ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.2.4 Other constraints and optimization problem . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.3 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.3.1 Observed stars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.3.2 Test/galaxy PSFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 5.3.3 PSF models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.4.1 Monochromatic PSFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.4.2 Test PSFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 5.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Figure 5 . 1 :

 51 Figure 5.1: Illustration of the imaging process in the case of a chromatically varying PSF, and the associated polychromatic PSF estimation problem (indicated by the question mark).

Figure 5

 5 Figure 5.2: First-guess dictionary atoms for an arbitrary component j. Each of the other r -1 initializations appear very similar.

Figure 5 . 3 :

 53 Figure 5.3: Optimal barycentric weight t * λ (u), for 10 positions u, each shown with a different color.

Figure 5 . 4 :

 54 Figure 5.4: Stellar SEDs used in our experiments.

Figure 5 . 6 :

 56 Figure 5.5: Example observed stars. Each corresponds to both a different position in the FOV and a different stellar SED.

  bin centered on z = 1.25.

Figure 5 . 7 :

 57 Figure 5.7: Example galaxy SEDs for Elliptical galaxies for two different redshift bins. Each color corresponds to one of 7 templates for elliptical galaxies. Similar plots for all considered galaxy SEDs are shown in Appendix I.

   show the true and reconstructed PSF, for a range of evenly spaced λ values, for a single randomly drawn position. The normalized pixel mean square error (MSE) per wavelength is shown in Figure5.10. Monochromatic profiles are recovered to few-percent accuracy, with a decrease in quality, and wider spread of errors across positions, in the few lowest wavelengths.

  j = 4.

  j = 4.

Figure 5 . 8 :

 58 Figure 5.8: λRCA-learned dictionary atoms D. The lowest (resp. highest) wavelength atom for each component j are shown on the left (resp. right).

Figure 5 . 9 :

 59 Figure 5.9: Selected monochromatic PSFs at individual wavelengths across the whole VIS band for a randomly drawn position. Row (a) show the true PSFs, row (b) their reconstruction using the λRCA model, and row (c) the absolute error between the two.

Figure 5

 5 Figure 5.10: Normalized pixel MSE as a function of wavelength. Error bars show variations across all 80 star positions.

Figure 5 .

 5 Figure 5.11: Example test PSF, reconstructions using regular RCA (i.e. neglecting chromatic variations) and λRCA, and the corresponding error maps.

Figure

  Figure B.2: A single exposure of the CFIS survey, observed with the CFHT's MegaCam. The object at the top-right of center of the mosaic is M101. Image rendered using the ds9 software (Joye and Mandel, 2003).

Figure

  Figure B.3: ρ statistics computed from our PSFEx model of the CFIS-r dataset. Dotted lines indicate negative values, the absolute values of which are represented.

Figure B. 4 :

 4 Figure B.4: Spatial distribution of the MegaCam PSF ellipticity (left), and average residuals after correction by our PSF model (right). The first (resp. second) row contains plots for the first (resp. second) ellipticity component.

Figure

  Figure B.5: Total number of stars identified, per position within the MegaCam FOV, across the whole processed CFIS data. Each CCD is separated into 5 × 10 bins.

F. 5

 5 of Ψ b Taking the logarithm of (4.25) yields log(Ψ(b, D, λ)) = s λ s log(ϕ(b s , d s )), the differentiation of which gives us∆ 1 N Ψ(b, D, λ) ∂ b Ψ(b, D, λ) = λ 1 I N . . . λ S I N ∆ 1 NS ϕ NS (b, D) ∂ b ϕ NS (b, D) =⇒ Ψ b = [∂ b ϕ NS (b, D)] ∆ 1 NS ϕ NS (b, D) J λ ∆(Ψ(b, D, λ)), S (∂ b Ψ(b, D, λ)) -∆ 1 NS ϕ NS (b, D) ∆(Φ(b, D, λ))∂ b ϕ NS (b, D) = ∆ 1 NS ϕ NS (b, D) I N,S (∂ b Ψ(b, D, λ)) -∆(Φ(b, D, λ))∂ b ϕ NS (b, D) =⇒ Φ b = Ψ b I N,S -[∂ b ϕ NS (b, D)] ∆(Φ(b, D, λ)) ∆ 1 NS ϕ NS (b, D) (F.2) = [[∂ b ϕ NS (b, D)] ∆ 1 NS ϕ(b, D) J λ ∆(Ψ(b, D, λ))I N,S -[∂ b ϕ NS (b, D)] ∆(Φ(b, D, λ))]∆ 1 NS ϕ NS (b, D) = [∂ b ϕ NS (b, D)] ∆ 1 NS ϕ(b, D) J λ ∆(Ψ(b, D, λ))I N,S -∆(Φ(b, D, λ)) ∆ 1 N ϕ NS (b, D) , (F.4) where I N,S = [I N , . . . , I N ] ∈ R N×NS . Moreover, we have Hence, in (F.4), Φ b = [∂ b ϕ NS (b, D)] ∆(Φ(b, D, λ))[J λ I N,S -I NS ]∆ 1 N ϕ NS (b, D) . Computation of Φ D Let i ∈ {1, . . . }. ∀s i, the only dependency in d i of Φ s (b, D, λ) resides in Ψ (see (4B, D, λ)) ∆(ϕ(b s , d s ))∆(ϕ(b i , d i )) i (B, D, λ)) ∆(ϕ(b s , d s ))

Figure H. 2 :

 2 Figure H.2: Same as Figure 4.6 when training on images of the digit 1.

Figure H. 3 :

 3 Figure H.3: Same as Figure 4.6 when training on images of the digit 3.

Figure H. 4 :

 4 Figure H.4: Same as Figure 4.6 when training on images of the digit 4.

Figure H. 5 :

 5 Figure H.5: Extreme wavelength PSFs in the dataset and atoms learned from NMF. See Figure 4.9 for those learned using our method.

Figure H. 7 :Figure I. 3 :

 73 Figure H.7: Similarly to Figure4.13, we compare our method to the Eigenfaces[START_REF] Turk | Eigenfaces for Recognition[END_REF] approach, NMF and K-SVD as a tool to represent faces on a low-dimensional space.

Titre:

  Estimation du champ de PSF pour l'effet de lentille gravitationnelle faible avec Euclid Mots cl és: Lentille gravitationnelle faible, Cosmologie, Euclid, Fonction d' étalement du point R ésum é: Le chemin parcouru par la lumi ère, lors de sa propagation dans l'Univers, est alt ér é par la pr ésence d'objets massifs. Cela entraine une d éformation des images de galaxies lointaines. La mesure de cet effet, dit de lentille gravitationnelle faible, nous permet de sonder la structure, aux grandes échelles, de notre Univers. En particulier, nous pouvons ainsi étudier la distribution de la mati ère noire et les propri ét és de l'Energie Sombre, propos ée comme origine de l'acc él ération de l'expansion de l'Univers. L' étude de l'effet de lentille gravitationnelle faible constitue l'un des objectifs scientifiques principaux d'Euclid, un t élescope spatial de l'Agence Spatiale Europ éenne dont le lancement est pr évu en 2022. En pratique, ce signal est obtenu en mesurant la forme des galaxies. Toute image produite par un instrument optique est alt ér ée par sa fonction d' étalement du point (PSF). Celle-ci a diverses origines : diffraction, imperfections dans les composantes optiques de l'instrument, effets atmosph ériques (pour les t élescopes au sol). . . Puisque la PSF affecte aussi les formes des galaxies, il est crucial de la prendre en compte lorsque l'on étudie l'effet de lentille gravitationnelle faible, ce qui n écessite de connaître la PSF avec une tr ès grande pr écision. Celle-ci varie en fonction de la position dans le plan focal. Une mesure de la PSF, à certaines positions, est donn ée par l'observation d' étoiles non-r ésolues dans le champ, à partir desquelles on peut construire un mod èle de PSF. Dans le cas d'Euclid, ces images d' étoiles seront sous-échantillonn ée et il est n écessaire d'int égrer une étape de super-r ésolution dans la construction du mod èle. En raison de la tr ès large bande d'int égration de l'imageur visible d'Euclid, il sera également n écessaire de capturer les variations en longueur d'onde de la PSF. La contribution principale de cette th èse est le d éveloppement de m éthodes novatrices d'estimation de la PSF, reposant sur plusieurs outils : la notion de repr ésentation parcimonieuse, et le transport optimal num érique. Ce dernier nous permet de proposer la premi ère m éthode capable de fournir un mod èle polychromatique de la PSF, construit uniquement à partir d'images sous-échantillonn ées d' étoiles et leur spectre. Une étude de la propagation des erreurs de PSF sur la mesure de forme de galaxies est également propos ée. Title: Euclid weak lensing: PSF field estimation Keywords: Weak Lensing, Cosmology, Euclid, Point Spread Function

  Universit é Paris-Saclay CEA Paris-Saclay, D épartement d'Astrophysique Orme des Merisiers, F-91191 Gif-sur-Yvette, France

  Table 2.1: Best-fit ΛCDM parameters and 68%-confidence regions, obtained from the combination of the full Planck data and BAO. H 0 is given in km/s/Mpc. Source: Planck Collaboration et al. (2018). chapter, reionization occurred when photons emitted from some of the earliest stars caused neutral atoms to

	Parameter	Value
	Ω Λ	0.6889 ± 0.0056
	Ω m	0.3111 ± 0.0056
	Ω b h 2	0.02242 ± 0.00014
	σ 8	0.8102 ± 0.0060
	n s	0.9665 ± 0.0038
	τ	0.0561 ± 0.0071
	H 0	67.66 ± 0.42
	measurements are an excellent probe into the value of τ, which is now extremely well constrained thanks to
	CMB experiments. Reionization itself, as well as its imprints on the CMB, are covered in standard cosmological
	textbooks (see, e.g., Dodelson, 2003, especially Section 8.7.2).
	One of the main goals of modern observational cosmology is to achieve the most precise measurements of
	the base parameters in the ΛCDM model; the best such values, at the time of this writing and for our chosen
	parametrization, are shown in Table 2.1. Another central goal is to search for deviations from this standard
	model. This could potentially be achieved from within the framework of ΛCDM, for instance if two independent
	cosmological probes were to measure significantly different values of one of its parameters. Another approach
	is to try and constrain alternative approaches; the simplest of which is that of a time-varying EOS of Dark
	Energy, as shown in (2.46): any measured deviation from (w 0 , w a ) = (-1, 0) would prove the cosmological
	constant proposal wrong.

ionize. τ is directly linked to the time (or redshift) at which this occurs, and it is not by coincidence that it is the only of the 7 cosmological parameters we have chosen that we have not stumbled upon up to now: we built our exposition of the standard model throughout this chapter with WL, a probe of the late Universe, in mind. It is then quite natural that, despite its importance in the cosmic history, our WL observations contain very little information about the value of τ; and, conversely, we managed to build the basic foundations necessary for the rest of this thesis without giving reionization much attention. Fortunately, unlike lensing by the LSS, CMB

  Contents 3.1 Sparse Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.1.1 Inverse problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.1.2 Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.1.3 Sparse representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.1.4 Convex optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.1.5 Proximal methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.1.6 Alternated minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.2 A primer on graph theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.3 Non-parametric Euclid PSF field recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.3.1 Modelling the PSF field from stars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.3.2 Resolved Components Analysis . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.3.3 PSF Field Recovery from Graph Harmonics . . . . . . . . . . . . . . . . . . . . . . . . . . 71 3.3.4 Comparison of PSF models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.3.5 Impact on galaxy shape measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3.3.6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.3.7 Partial conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

  For a d-dimensional histogram of N = n d bins, applying a separable kernel amounts to performing a sequence of d steps, where each step computes n operations per bin. It results in a O(n d+1 ) = O(N d+1 d) cost instead of O(N 2 ). As mentioned previously, the stabilized kernel (4.33) is not separable, prompting us to introduce a new stable and separable kernel suitable for log-domain processing.

  80 other positions are drawn from those with available PSF simulations. We will refer to these as "test" or galaxy positions.The galaxy SEDs we use are those of[START_REF] Ilbert | COSMOS photometric redshifts with 30-bands for 2-deg 2[END_REF] and were provided by my cosupervisor, Martin Kilbinger, following exchanges with Francisco Castander 4 . These contain 31 different template SEDs, corresponding to 7 elliptical, 1 lenticular, 11 spiral, and 12 starburst galaxy types. Each of these include extinction by the galaxy itself, selected from 5 different possible extinction laws, but no extinction by the Milky Way.For each of 31 × 80 = 2480 unique combinations of position and galactic SED template, we draw a redshift value from 5 very wide bins of ∆z = 0.5, with probabilities matching the expected lensing n(z) of the Euclid Wide Survey(Euclid Collaboration et al., 2019) as shown in Figure5.6. Each SED is redshifted accordingly, and sampled with the correct ∆λ within the VIS band. Examples for two redshift bins and the elliptical galaxy SED templates are shown in Figure5.7. The final, integrated test PSF are then computed by summation at the finest available pixel scale, then sampled at our target pixel scale and stamp size of 42 pixels. This results in a set of 2480 test PSFs H(u, S j )

			Elliptical galaxy SED templates
	0.018
	0.017
	0.012 0.013 0.014 0.015 0.016 S(λ) (arbitrary units) Flux
	0.011
	550	600	650	700	750	800	850	900
				Wavelength λ (nm)
	u∈U gal , j∈{1,...,31}	.

  Table 5.1: Summary of quality criteria for both PSF models across all galaxy types. Here, σ denotes the RMS error.

		Normalized pixel MSE	σ(e 1 )	σ(e 2 )	σ(R 2 )/R 2
		RCA	λRCA	RCA λRCA	RCA	λRCA RCA λRCA
	Elliptical	0.016	0.0095	0.018 0.021 0.0050 0.0046 0.32	0.15
	Spiral & lenticular	0.016	0.0095	0.018 0.021 0.0051 0.0047 0.32	0.15
	1 st group Starburst 0.017	0.0096	0.018 0.023 0.0053 0.0051 0.35	0.14
	2 nd group Starburst 0.020	0.010	0.020 0.027 0.0059 0.0059 0.40	0.13

  Template SEDs for the spiral and lenticular galaxies.

	500 550 600 650 700 750 800 850 900 950 Wavelength 0.002 0.003 0.004 0.005 0.006 0.007 0.008 z = 0. 0; type=Spiral 500 550 600 650 700 750 800 850 900 950 Wavelength 0.0000 Flux 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 Flux z = 1. 0; type=Spiral 500 550 600 650 700 750 800 850 900 950 S0_A_0_1 Sa_A_0_1 Sa_A_1_1 Sb_A_0_1 Sb_A_1_1 Sc_A_0_1 Sc_A_1_1 Sc_A_2_1 Sd_A_0_1 Sd_A_1_1 Sd_A_2_1 Sdm_A_0_1 500 550 600 650 700 750 800 850 900 950 Wavelength 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 0.0040 0.0045 0.0050 Flux z = 0. 5; type=Spiral S0_A_0_1 Sa_A_0_1 Sa_A_1_1 Sb_A_0_1 Sb_A_1_1 Sc_A_0_1 Sc_A_1_1 Sc_A_2_1 Sd_A_0_1 Sd_A_1_1 Sd_A_2_1 Sdm_A_0_1 500 550 600 650 700 750 800 850 900 950 Wavelength 0.0000 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0007 0.0008 Flux z = 1. 5; type=Spiral Wavelength 0.0000 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0007 Flux z = 2. 0; type=Spiral S0_A_0_1 Sa_A_0_1 Sa_A_1_1 Sb_A_0_1 Sb_A_1_1 Sc_A_0_1 Sc_A_1_1 Sc_A_2_1 Sd_A_0_1 Sd_A_1_1 Sd_A_2_1 Sdm_A_0_1 EC Euclid Consortium. EDF Euclid Deep Field. ELAIS European Large-Area Infrared Space observatory. EOS Equation of State. EPFL Ecole Polytechnique F éd érale de Lausanne. ES1 ELAIS South 1. ESA European Space Agency. ESI Echelle Spectrograph and Imager. Figure I.4: DLS Deep Lens Survey. FFT Fast Fourier Transform.	S0_A_0_1 Sa_A_0_1 Sa_A_1_1 Sb_A_0_1 Sb_A_1_1 Sc_A_0_1 Sc_A_1_1 Sc_A_2_1 Sd_A_0_1 Sd_A_1_1 Sd_A_2_1 Sdm_A_0_1 S0_A_0_1 Sa_A_0_1 Sa_A_1_1 Sb_A_0_1 Sb_A_1_1 Sc_A_0_1 Sc_A_1_1 Sc_A_2_1 Sd_A_0_1 Sd_A_1_1 Sd_A_2_1 Sdm_A_0_1

FLRW Friedmann-Lemaître-Robertson-Walker.

FORS FOcal Reducer and low dispersion Spectrograph.

  Kilo Degree Survey. MUG Multimedia Understanding Groups database. NISP Near Infrared Spectrometer and Photometer. VIRMOS Visible and InfraRed Multi-Object Spectrographs.

	NMF Non-negative Matrix Factorization.
	OT Optimal Transport.
	PCA Principal Components Analysis.
	PDF probabilty density function.
	PFIC Prime Focus Imaging Camera.
	photo-z photometric redshift.
	PPS Primordial Power Spectrum.
	PSF Point Spread Function.
	PSNR Peak SNR.
	KL Kullback-Leibler.
	KSB Kaiser-Squires-Broadhurst.
	L-BFGS Limited memory BFGS. VIS Euclid Visible instrument.
	LMC Large Magellanic Cloud. VLT Very Large Telescope.
	LSS Large Scale Structure. VOICE VST Optical Imaging of the CDFS and ES1 fields.

LSST Large Synoptic Survey Telescope. MNIST Modified National Institute of Standards and Technology database. MPG-ESO Max Planck Gesellschaft-European Southern Observatory. MSE mean square error. RBF Radial Basis Function. RCA Resolved Components Analysis. RCS Red-sequence Cluster Survey. RMS root mean square. SDSS Sloan Digital Sky Survey. SED spectral energy distribution. SNR Signal-to-Noise Ratio. SSP Strategic Subaru Proposal. STIS Space Telescope Imaging Spectrograph. SVD spectral value decomposition. UH University of Hawai'i. VST VLT Survey Telescope. WDL Wasserstein Dictionary Learning. WFE wavefront error.

Not a typo, just French.

This seems to be a recurring thing in my interaction with Philippes.

And only three -and here would go a sadface emoji, but I promised myself there would be none in this thesis, not even in the acknowledgments.

Not an official Euclid term.

Meta Jean-Louis. Please contact the corresponding author for details.

All its staff.

And some people could tell you, especially among those yet-to-be-named in those here acknowledgments, that a Morgan does hate a phonecall.

Which, interestingly though irrelevantly, happens to be in the same order-of-magnitude timescale as that of recent estimates for the appearance of life on Earth(Dodd et al.,

2017).

Note that despite similar notations, and usage that could lead to confusion, h is not in any direct way related to Planck's constant h.

Much like ρ c can be defined at any time t by replacing present-day values in (2.14) with their value at time t, the Ω α 's can be computed at any arbitrary time. In the present thesis, the ρ c and Ω α notations shall always refer to present-day values, despite their lacking the usual 0 subscript.

The indicator function we have chosen to use here is more commonly found in the form of a Dirac delta function in the literature, though we will come to make use of 1 again in the remainder of this thesis (and of its infinite counterpart, ι, that we shall introduce in due time).

The combination of a cosmological constant with non-relativistic dark matter gives the "concordance" model its name: ΛCDM.

In fact, as we mentioned at the beginning of the chapter, both did: the radiation-domination era, with scale factor α ∝ t 1/2 , lasted until the Universe was a few tens of thousands years old, at which point it became matter-dominated, with α ∝ t 2/3 .

When referencing "Stages" of cosmological experiments, I aim to match the (actualized) definitions of the Dark Energy Task Force[START_REF] Albrecht | Report of the dark energy task force[END_REF], that is, Stage I and II surveys as already completed and ongoing then, respectively, Stage III as "near-term, medium-cost" projects, and Stage IV as listed here.

An approximation of the potential of a lens with radius R and mass M is GM/R = (c 2 /2)(R S /R), with R S the Schwarzschild radius of the lens. The weak field approximation thus only breaks down for extremely compact objects, which we can afford not to concern ourselves with when looking at the gravitational lensing caused by the LSS.

The fourth data release[START_REF] Kuijken | The fourth data release of the Kilo-Degree Survey: ugri imaging and nine-band optical-IR photometry over 1000 square degrees[END_REF] of the Kilo Degree Survey (KiDS) came after Hyper Suprime-Cam (HSC)'s first, though

Note this does not mean it is the last WL paper published for this particular survey/dataset. For past surveys, there typically are several more papers with cosmological analysis and re-analysis, which sometimes include larger areas than those used in the reference cited in the table (e.g.Hoekstra et al., 2002a, in the case of RCS), or the combination of several different surveys (e.g. the "100-deg 2 " survey of[START_REF] Benjamin | Cosmological constraints from the 100-deg 2 weak-lensing survey[END_REF]. However, when the shape measurement remains largely unchanged, I chose to cite the earlier paper that gives the most detailed account of the shape measurement pipeline.

https://github.com/GalSim-developers/GalSim

Note the aforementioned approach of[START_REF] Pujol | A highly precise shear bias estimator independent of the measured shape noise[END_REF] also makes use of the idea of shear responsivity, though within a simulationdriven calibration framework.

When I began my work on the Euclid PSF, the name we used for these methods was "data-driven". Since physical models also use data to fit the parameters, this naming scheme was faded out in favour of the parametric/non-parametric one. Of course, one could argue that non-parametric models still do contain some parameters, as we shall see in Chapters 3 and 5.

As specified in the internal "EUCL-EST-TN-1-002" document.

Note we will use a similar difference in measured biases in our own simulations (to remove all effects due to the shape measurement itself and not the PSF model) in Chapter 3.

Where, here and throughout, I shall try to use i to index different objects (stars or galaxies), and j to index elements of S , which I shall carry on referring to as eigenPSF, even when they are not actually chosen through PCA.

In the meantime, Euclid members may refer to the "EUCL-OXF-TN-draft" document.

https://github.com/rmjarvis/Piff

https://github.com/CEA-COSMIC/ModOpt

In this context, Λ denotes a matrix containing a set of weights, and has nothing to do with the hypothetical cosmological constant discussed in Equation2.1.5. This will also be the case throughout Chapter 4.

https://github.com/CosmoStat/rca

The python script I used to perform this step, and others related to handling SExtractor and PSFEx with simulated PSFs can be found at https://github.com/MorganSchmitz/PySFEx.

https://bitbucket.org/joezuntz/im3shape-git

In this case, the loss is computed iteratively as explained in Section 4.2.1, and a(L) in the gradient's expression is obtained after L iterations as in (4.9).

https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.zoom.html

https://github.com/CosmoStat/LambdaRCA

https://github.com/matthieuheitz/WassersteinDictionaryLearning

Readers with access to CEA's Direction de la Recherche Fondamentale private repositories can find them at https:// drf-gitlab.cea.fr/mkilbing/SED.

https://github.com/msimet/Stile

Acknowledgments

books by five authors. Each book is plotted according to its barycentric coordinates with regard to the learned atoms, as explained in Section 4.5.3.

Chapter 6

Conclusion

This thesis presents a study of non-parametric approaches to PSF modelling for WL surveys. Several upcoming surveys, including Euclid, will soon start their observations. They will bring a wealth of cosmological information from WL surveys of unprecedented breadth. This will only be possible, however, if we are able to correctly handle the main source of error in galaxy shape measurement: the PSF.

Main contributions

Historically, non-parametric approaches to model the PSF have proven to be more efficient than physicallymotivated ones. In the case of Euclid, however, no existing model can be directly applied. Indeed, the PSF of Euclid's VIS instrument comes with new modelling challenges that the WL community had never been faced with before. Chief among those is the chromatic variation of the PSF over the very broad band of VIS. In this thesis, I have improved upon existing PSF models, and devised a new approach to capture these chromatic variations. Achieving this in a non-parametric framework is an especially hard task, since the information to be recovered is highly degraded. Not only is the PSF affecting objects integrated, with their own SED, over the whole band, these broadband observations are also undersampled. Recovering a polychromatic PSF model from such observations amounts to solving an ill-posed inverse problem.

Advanced mathematical tools were deployed to solve this problem. To tackle the issues of noise, undersampling, and spatial variations of the PSF, I have made use of sparse signal processing. These methods were used to improve upon a recently proposed PSF modelling approach in Chapter 3, and extensively tested using image simulations.

In order to break down SED-integrated, undersampled star images into a set of monochromatic PSFs spanning the whole band, I have turned to Numerical OT. Following recent developments in this fairly new field, numerical tools derived from the theory of optimal transportation can now be readily computed and applied to practical problems. In particular, the Wasserstein distance, that describes the effort needed to "transport" a probability measure into another, has already proven to be an extremely potent tool in machine learning applications. In this vein, in Chapter 4, I have presented a new, non-linear dictionary learning approach, called WDL. This new method fully leverages the attractive properties of OT in its learned representation of "data", which can come in many forms. In particular, WDL can be applied to images -including PSFs.

In Chapter 5, I made use of several concepts and numerical tools we created as part of the development of WDL. The addition of this OT component to the PSF modelling problem led to the creation of λRCA: a nonparametric PSF model that successfully recovers chromatic variations using no information other than images of observed stars, their SEDs (or estimates thereof), and positions within the focal plane. Beyond these methodological contributions, I have performed extensive image simulations to test the impact of PSF modelling errors on galaxy shape measurements. Through these, I showed that in the case of Euclid, usual assumptions about the propagation of PSF errors break down. The quality of a PSF model is traditionally assessed by looking at its size and ellipticity: quantities of second order. This assessment is also mostly done independently from the shape measurement process. Our experiments show that for Euclid (or any nearly diffraction-limited instrument):

• higher-order effects can affect measured galaxy shapes, and thus shear estimation;

• the propagation of PSF error varies from one shape measurement method to another.

Appendices

List of publications.

This appendix contains a list of publications and presentations given as part of this thesis.

A.1 List of Paper 2 authors

Paper II is a Euclid "Standard Project" paper. The complete list of its authors can be found below. M.A. Schmitz 1 , J.-L. Starck 1 , F. Ngole Mboula 2 , N. Auricchio 3 , J. Brinchmann

A.3 Talks & posters

• Euclid Consortium Meeting 2019, Helsinki, Finland, June 2019 (STAR prize awardee plenary talk).

• France for Euclid VII, Nice, France, November 2018 (talk).

• CNES Young Researchers Days, Toulouse, France, October 2018 (flashtalk & poster).

• French-Chinese Days on Weak Lensing, Saclay, October 2018 (talk).

• Euclid Consortium Meeting 2018, Bonn, Germany, June 2018 (talk).

• Cosmo21, Valencia, Spain, May 2018 (talk).

• CosmoStat Day on Machine Learning in Astrophysics, Saclay, France, January 2018 (talk).

• France for Euclid VI, Paris, France, December 2017 (talk).

• Data Science Summer School, Palaiseau, France, August 2017 (poster).

• SPIE Optics+Photonics, San Diego, CA, July 2017 (talk, proceeding).

• SPACEOBS colloquium on data inversion and assimilation, Orsay, France, May 2017 (talk).

• Cavalieri Workshop on Optimal Transport and Optimisation, Paris, France, October 2016 (talk). Ongoing efforts are currently being carried out to use CFIS data to perform WL measurements. Two shape measurement pipelines are being independently applied to allow for comparison and mutual cross-validations:

LensFit (that we already mentioned in Equation 2. 4.3) and ShapePipe. This chapter presents my contributions to the PSF modelling and diagnostics for the latter.

This work was carried out in collaboration with the whole ShapePipe team, and especially my fellow PhD student Axel Guinot. These results will appear, along with many other diagnostics of the rest of the pipeline, in Guinot et al. (in prep). Some of these extra results also involve the PSF, for instance the spatial correlations between PSF model and measured galaxy shapes. In this chapter, however, I will focus only on diagnostics of the PSF model itself, and not on the PSF correction.

B.1 PSF models

In order to have a first functional shape measurement pipeline, standard methods to perform for each step (see Section 2.3 for a brief overview) were first implemented in ShapePipe. In the case of the PSF, we thus first implemented the tried-and-tested PSFEx approach [START_REF] Bertin | Automated Morphometry with SExtractor and PSFEx[END_REF]. See Sections 2.4.2 and 3.3.1 for more details about the PSFEx model. It was originally designed to be ran in conjunction with companion software SExtractor [START_REF] Bertin | SExtractor: Software for source extraction[END_REF] in order to perform shape measurement. In the case of ShapePipe, however, we only want to make use of its PSF model, so that we can use any shape measurement method.

Small interfacing functions need to be applied to extract the PSF model from the PSFEx output files and compute it at any arbitrary position. The same thing was done in DES [START_REF] Jarvis | The DES Science Verification weak lensing shear catalogues[END_REF], HSC [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF], and in our own experimental set-up of Chapter 3.

A freely available code 1 , written by Erin Sheldon and Eli Rykoff, performs this step and was originally used for our processing of the CFIS data. However, after running into some unidentified issues and in order to obtain more flexibility when changing the upsampling parameter of PSFEx, we later changed to a version of the script 2 I used for the experiments of Chapter 3, slightly modified to fit the needs of (and the interfacing with) ShapePipe.

As with both current surveys using PSFEx, most of its parameters are left to their default values which are also very close to those shown in Figure 3.3.4. One difference is in the use XWIN_IMAGE,YWIN_IMAGE instead of X_IMAGE,Y_IMAGE as the position parameters. We found that setting the maximum polynomial degree to 3 led to a decrease in the PSF model quality, as measured from the diagnostics shown in Sections B.2 and B.3. We therefore set it to 2. Lastly, the results we show in the present chapter were obtained by setting the PSF_SAMPLING parameter to 1. This means PSFEx did not attempt to perform superresolution. Some early testing on a small area of the sky seemed to indicate using a lower value led to worse results, though this is something we plan on testing further in the future. We note, however, that [START_REF] Bosch | The Hyper Suprime-Cam software pipeline[END_REF] no superresolution already seems to be of good quality. We will show some of the diagnostics that allowed us to reach this conclusion in the rest of this chapter.

Our goal is to eventually include the PSF models described in earlier chapters of this thesis into ShapePipe. The RCA code is now implemented as a ShapePipe module and successfully runs within the pipeline. However, we found that because of several effects never encountered when applying it to simulated star fields, yet more modifications are required before it can be fully functional. As an example, the handling of SExtractor masks within the method was required. We used this opportunity to improve RCA by making it capable of handling any pixel-wise weights.

Another problematic corner case is that of a CCD where the star selection fails, for instance if the stellar locus is not found (see Figure 2.7). PSFEx's diagnostics can be used to identify and automatically remove such cases (for instance by performing a selection on the final χ 2 value). Critical failure cases could potentially be missed by RCA, however, as in its present state it assumes the catalog it receives as input contains only stars.

While not directly related to the PSF model itself, such a case of unusable star catalog occurred in the early days of our testing of ShapePipe on CFIS data. By checking instances of catastrophic failure of PSFEx individually, I came across a CCD that contained an abnormally large amount of objects identified as stars.

Inspection of individual postage stamps from that catalog showed that several indeed appeared to contain a star, along with many SExtractor mask. We eventually had to return to the original exposure to identify the problem. It is reproduced in Figure B.2: the CCD was one close to object M101. While admittedly anecdotal, this example illustrates how studying the PSF can reveal issues with entirely different parts of the pipeline (in this case, local objects that had not been masked), or even the survey as a whole. Another example of an issue with ShapePipe revealed by PSF studies will be given in Section B.3.

B.2 ρ statistics

We now present diagnostics of our CFIS PSF model, computed on the original processing of an area of about 2, 200 square degrees.

In Section 2.4.1, we presented the Paulin-Henriksson et al. ( 2008) formalism of PSF error propagation. While we have subsequently shown its underlying assumptions no longer hold true for a diffraction-limited PSF (see Figure 3.3.6), it remains applicable to a ground-based survey like CFIS. We can thus use the real-data diagnostics we introduced in Section 2.4.2.

While there are, at this time, no requirements for CFIS WL, we can still use these to compare different PSF models applied to CFIS. As both HSC and DES use PSFEx, the ρ statistics also provide us with a mean to check whether it achieves similar performance when used in ShapeLens and on CFIS. The ρ statistics computed across the whole processed area of CFIS are shown in Figure B.3. These were computed using the freely available Stile 3 package, developed for HSC/LSST. We note that the precise definition of the ρ statistics used by [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF] and [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF] differ. These correspond to the latest DES and HSC shape catalogs, respectively. In (2.113-2.117), the residual terms are uniquely defined up to a sign swap, but quantities related to the PSF shape itself can either be computed from stars (as is done in DES) or the PSF model (in HSC). Since the key element in the ρ statistics are the shape residuals, and they are computed through averaging over a large number of objects, this choice of convention is of little import. We do observe some variations in the resulting ρ values when computed using one convention or the other on both our own CFIS data, and the DES Year 1 star catalog.

The values we observe in Figure B.3 are of the same order as those obtained by [START_REF] Zuntz | Dark Energy Survey Year 1 results: weak lensing shape catalogues[END_REF] and [START_REF] Mandelbaum | The first-year shear catalog of the Subaru Hyper Suprime-Cam Subaru Strategic Program Survey[END_REF]. Since LensFit was also ran on CFIS data, we computed the ρ statistics using the LensFit star catalog and PSF model. Since these catalogs are not yet ready for the whole area processed by ShapePipe, this comparison was done on a smaller area, namely the W3 field of CFHTLenS (that was reobserved by CFIS). The ρ statistics computed on the same field for our own star/PSF catalogs were Appendix C

Shape measurement experiment: additional information

This appendix contains further details about the experiments of Chapter 3.

C.1 im3shape configuration

Below is the configuration file used when running im3shape Note that default values are used for all parameters not specified in this config file. Proof of (4.17-4.18)

C.2 KSB-HSM outlier counts

By differentiating (4.23) with regard to the dictionary or one of the barycentric weights, we can rewrite the Jacobians in (4.16), (4.17), respectively, while separating the differentiations with regard to the dictionary D, the weights λ i and the scaling vector b, by total differentiation and the chain rule:

b , (D.1)

And, differentiating (4.24),

We then have, by definitions (4.30)-( 4.31) and by plugging (D.1) and (D.3) into (4.16),

where the sum starts at 0 because B (0) D = 0 since we initialized b (0) as a constant vector. This proves (4.28). Similarly, differentiating with regard to λ yields l+1) .

This proves (4.29). The detailed derivation of the differentials of ϕ, Φ, and Ψ with regard to all three variables is given in Appendix F.

157

APPENDIX D. PROOF OF (4.17-4.18) Appendix E

Stabilized backward loop

Algorithm E.1: logSinkhornGrads: Computation of dictionary and barycentric weights gradients in log-domain.

Log-domain variables are marked with a tilde.

159

Appendix F

Detailed derivations

Let us first introduce the following notation:

Generalized barycenters

H.2 PSF application

This section contains the additional

H.3 Wasserstein faces

This section contains the additional FIgures H.6 and H.7 for the application of Section 4.5.4.

Appendix I

Galaxy SEDs

This appendix contains plots of all the template galaxy SEDs used in Chapter 5. Note unlike those shown in WFIRST Wide Field Infrared Survey Telescope.

WFPC2 Wide Field Planetary Camera 2.

WHT William Herschel Telescope.

WL weak (gravitational) lensing.

WPG Wasserstein Principal Geodesic.